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
Guy can someone tell me. Had update the winston-papertrail to version 1.0.5 (winston version 3.0.0), and saw interesting thing. 2nd parameter 'message' that came in logFormat, formated like this, example:
'Some message { message: 'Some message', level: 'info' }'
Should it be like this, or not? If yes, how to work with it?
After investigation I found in file /lib/winston-papertrail.js, line:325 (var output = msg;)
That set this duplication msg.
`var output = msg;
// If we don't have a string for the message,
// lets transform it before moving on
if (typeof(output) !== 'string') {
output = util.inspect(output, false, self.depth, self.colorize);
}
if (meta) {
if (typeof meta !== 'object') {
output += ' ' + meta;
}
else if (meta) {
if (this.inlineMeta) {
output += ' ' + util.inspect(meta, false, self.depth, self.colorize).replace(/[\n\t]\s*/gm, " ");
}
else {
output += '\n' + util.inspect(meta, false, self.depth, self.colorize);
}
}
}
this.sendMessage(this.hostname, this.program, level, output, callback);`
How logs should looks like?
How work with colorize? It doesn't work for me.
Maybe someone can share best practice.
Would be apriciate for any help.
The text was updated successfully, but these errors were encountered:
I am also facing similar issue with winston 3.x and winston-papertrail 1.0.5.
Papertrail sends logs as message = message-string + stringified JSON object.
This reduces log readability and creates distraction.
If I downgrade to winston 2.2.0 then winston-papertrail 1.0.5 send proper logs without stringified JSON object.
Guy can someone tell me. Had update the winston-papertrail to version 1.0.5 (winston version 3.0.0), and saw interesting thing. 2nd parameter 'message' that came in logFormat, formated like this, example:
'Some message { message: 'Some message', level: 'info' }'
Should it be like this, or not? If yes, how to work with it?
After investigation I found in file /lib/winston-papertrail.js, line:325 (var output = msg;)
That set this duplication msg.
`var output = msg;
How logs should looks like?
How work with colorize? It doesn't work for me.
Maybe someone can share best practice.
Would be apriciate for any help.
The text was updated successfully, but these errors were encountered: