Skip to content
New issue

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

Question / Request: add full_message support for legacyFormat = false #25

Open
smantel-ch opened this issue Apr 16, 2021 · 0 comments
Open

Comments

@smantel-ch
Copy link

smantel-ch commented Apr 16, 2021

Hi
First of all, thanks for creating this transporter!
I also would like to outline that I only recently started using winston and winston-log2gelf.

While playing around with this transporter I realised that full_message is set as info.message:
https://github.com/Buzut/winston-log2gelf/blob/master/index.js#L195
fullMessage = info.message;

I'm not familiar what exactly legacyFormat is but when setting it to true I can pass metadata and it is added as JSON to full_path

Would it make sense to do something like this when legacyFormat is false:
fullMessage = (info.full_message !== '' || info.full_message === undefined) ? info.full_message : info.message;
And yes, this would mean the meta would need to have a property called full_message

@smantel-ch smantel-ch changed the title add full_message support for legacyFormat = false Question / Request: add full_message support for legacyFormat = false Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant