-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add support for non-bunyan loggers #88
Add support for non-bunyan loggers #88
Conversation
Hi Denis, supporting other loggers is definitely a worthwile feature, thanks for bringing this up and submitting a PR! I'm not 100% sure about the best configuration API to offer this. Here are some thoughts:
It probably makes sense to come to a decision regarding (1.) before tackling (3.) and (4.). If you would rather not invest time in (3.) and (4.), I'm happy to take over those chores. I'd like to hear your thoughts on (1.), though. |
@@ -8,7 +8,10 @@ var parentLogger; | |||
|
|||
exports.init = function(config) { | |||
if (config.logger) { | |||
parentLogger = config.logger.child({module: 'instana-nodejs-logger-parent'}); | |||
parentLogger = config.logger; |
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.
If I understand your change correctly, your intention would be to use config.nonBunyanLogger
to pass in a logger object. Any particular reason to change the above line, handling the Bunyan case?
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.
This was changed accidentally. i removed this change.
b6c23c1
to
75428db
Compare
Hi @basti1302, I agree, using the I can add some test cases for the new feature and document it. |
Cool, looking forward to it :-) |
75428db
to
ce83297
Compare
Looks great, thanks! 🎉 This will go out with the next version. |
This adds support for non-bunyan loggers that do not have
logger.child()
,logger.addStream()
orlogger.level()
like winston.