Skip to content

Conversation

@tomasAlabes
Copy link

logstash['@fields'] = info;
if (info.level) {
logstash.level = info.level;
delete info.level;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomasAlabes Thanks and sorry for slow review! Only question is: why are you deleting info.level? This doesn't seem necessary and feels like it could interfere with subsequent formatters that expect to find it? Let me know what you think -- thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem David.
Honestly, I was just following the pattern of the previous code 🤷‍♂️

@DABH
Copy link
Contributor

DABH commented Mar 11, 2019

Happy to merge once comments are addressed

delete info.timestamp;
}

logstash['@fields'] = info;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this line will also remove all root level fields, not just level.

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

Successfully merging this pull request may close these issues.

3 participants