Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

feat(utils): log fileInfo errors at parent log level, demote warning #131

Merged
merged 1 commit into from
Jun 5, 2017
Merged

feat(utils): log fileInfo errors at parent log level, demote warning #131

merged 1 commit into from
Jun 5, 2017

Conversation

m90
Copy link
Contributor

@m90 m90 commented Apr 29, 2017

Right now, every message that will be parsed by any integration will always pass the fileInfo utility method. This method will log a message on every missing file (which is basically on almost every message) at error level, and there is currently no way of having this respect a any other user set log level. This is very noisy and also rather confusing in production as it logs something like this on every incoming message:

image

Instead, this PR demotes the message to debug level and uses the logger of the parent integration for logging this, so that we respect the log level set on the parent.

instead of keeping a stand alone logger instance in the fileInfo utility method
pass in the (optional) logger from the parent, enabling the user to use the same
log level for all messages
Copy link
Contributor

@dustinblackman dustinblackman left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me.

@killix killix changed the base branch from master to devel May 29, 2017 15:54
@dustinblackman dustinblackman merged commit de26b0a into broidHQ:devel Jun 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants