You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-2
Original file line number
Diff line number
Diff line change
@@ -675,10 +675,21 @@ To colorize the standard logging level add
675
675
```js
676
676
winston.format.combine(
677
677
winston.format.colorize(),
678
-
winston.format.json()
678
+
winston.format.simple()
679
+
);
680
+
```
681
+
where `winston.format.simple()` is whatever other formatter you want to use. The `colorize` formatter must come before any formatters adding text you wish to color.
682
+
683
+
### Colorizing full log line when json formatting logs
684
+
685
+
To colorize the full log line with the json formatter you can apply the following
686
+
687
+
```js
688
+
winston.format.combine(
689
+
winston.format.json(),
690
+
winston.format.colorize({ all })
679
691
);
680
692
```
681
-
where `winston.format.json()` is whatever other formatter you want to use. The `colorize` formatter must come before any formatters adding text you wish to color.
0 commit comments