Skip to content

Commit fc702f1

Browse files
committed
fix(json-logs): use stringify option
This forces the JSON output to be on a single line. Without it, it's not easy to parse the logs. Connects #47 See https://github.com/winstonjs/winston/blob/2.4.0/docs/transports.md#console-transport
1 parent 7ff7e6c commit fc702f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function CreateLogger( name, loggerOpts ){
1616
new winston.transports.Console( {
1717
colorize: pkgConfig.colorize,
1818
json: pkgConfig.json,
19+
stringify: true,
1920
timestamp: pkgConfig.timestamp,
2021
level: pkgConfig.level,
2122
label: name

0 commit comments

Comments
 (0)