-
Notifications
You must be signed in to change notification settings - Fork 60
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
FEAT: Support ignorePaths
option to exclude certain paths from logging.
#30
FEAT: Support ignorePaths
option to exclude certain paths from logging.
#30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a unit test, and use https://www.npmjs.com/package/abstract-logging
@mcollina Definitely plan to add coverage, just wanted to give you early look at the implementation. |
@mcollina I'm not sure what you're referring to with the request for I've got the text coverage added. |
index.js
Outdated
|
||
for (let i = 0; i < levels.length; i++) { | ||
logger[levels[i]] = noop | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of building a null logger every time, you can use https://www.npmjs.com/package/abstract-logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see now. I was trying to keep hapi-pino
in that golden single external dep happy place a while longer. I can pull that in if you'd prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the dependency ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@deedubs do you wanna add the option to the |
This is my first pass at this.
My goals were:
closes #26