We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm suggesting to add an option to the splat transformer that would allow to keep the source/original message (before formatting) in the metadata.
Current behavior:
const logger = winston.createLogger({ level: 'info', format: winston.format.combine( winston.format.splat(), winston.format.logstash() ), transports: [ new winston.transports.Console() ] }); logger.info('hello %s', 'world', { foo: 'bar'} ); //> {"@message":"hello world","@fields":{"level":"info","foo":"bar"}}
Desired behavior
const logger = winston.createLogger({ level: 'info', format: winston.format.combine( winston.format.splat({ source: 'raw', arguments: 'params'}), winston.format.logstash() ), transports: [ new winston.transports.Console() ] }); logger.info('hello %s', 'world', { foo: 'bar'} ); //> {"@message":"hello world","@fields":{"level":"info","raw":"hello %s","params":["world"],"foo":"bar"}}
I hope this suggestion will be accepted, it would be very useful when working with logging systems like the Elastic stack.
Best regards
The text was updated successfully, but these errors were encountered:
Splat original message and parametters (winstonjs#94)
3ad7020
Added the possibility to keep track of the message and parameters before formatting/interpolation
No branches or pull requests
Hello,
I'm suggesting to add an option to the splat transformer that would allow to keep the source/original message (before formatting) in the metadata.
Current behavior:
Desired behavior
I hope this suggestion will be accepted, it would be very useful when working with logging systems like the Elastic stack.
Best regards
The text was updated successfully, but these errors were encountered: