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
{{ message }}
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,7 @@ Options override both default logger configuration and environment-specific conf
102
102
- `enableFields` - list of paths which will not be omitted by default serializers from objects being logged
103
103
- `streams` - list of stream objects, which will be passed directly to [pino-multistream's multistream function](https://github.com/pinojs/pino-multi-stream#pinomsmultistreamstreams) instead of default `ackee-node-logger` stream
`ackee-node-logger` defines some [pino serializers](https://github.com/pinojs/pino/blob/master/docs/API.md#constructor) on its own
@@ -110,3 +111,36 @@ Options override both default logger configuration and environment-specific conf
110
111
-`processEnv`- logs `NODE_PATH` and `NODE_ENV`
111
112
-`req`- logs `body`, `query`, `url`, `method` and omits `password` and `passwordCheck` from `body` and `query`
112
113
-`res`- logs `out` and `time`
114
+
115
+
116
+
## Tips
117
+
118
+
### Nice Google Cloud Stackdriver messages
119
+
120
+
If you examine log messages in Google's [Stackdriver](https://cloud.google.com/stackdriver/) you probably noticed that most of the time, the whole message payload is displayed as a "title" of the message.
121
+
122
+
This is because Stackdriver takes the title from `message` field (if available). But pino (ackee-node-logger underlying library) logs those titles to `msg` field (by default).
123
+
124
+
This can be changed by passing pino the `messageKey` option. It will hide the pretty print message title, but you will have nicer Stackdriver messages
This problem is caused by a way VS Code handles console output. Therefore it appears in Winston and pino (underlying library of ackee-node-logger) as well.
133
+
134
+
However, it can be easily solved by adding eithe
135
+
136
+
```js
137
+
"console": "integratedTerminal",
138
+
```
139
+
140
+
or
141
+
142
+
```js
143
+
"outputCapture": "std"
144
+
```
145
+
146
+
to the debug configuration in your `launch.json` file.
0 commit comments