Is your feature request related to a problem? Please describe.
I would like to use probot as part of a larger application, and I already have my own logger. I want to have consistent logging behavior across my application.
Describe the solution you'd like
I'd like to be able to override the logger on probot with my own logger.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I tried monkey patching by overriding probot.logger but was unable to achieve the desired end effect.
@booninite can you expand on your monkey patching attempt? I believe that should work (I've done it myself in the past). It'd help to understand your attempted solution - I'm not sure that allowing a custom logger to be passed would be all that useful, since the inner code would need to conform to a Bunyan-like API anyway.
Also - is there a reason you need to replace it with your own logger? If its for formatting, let's explore other ways to achieve the formatting you're expecting.
Just want to expand on this request as I'm looking to do something similar. Bunyan as a logger suits our needs, however we'd like to be able to direct the output to specific streams (e.g. a stream that points to our centralized logging service). Is this doable currently, or possibly on the roadmap?
@logicbomb421 this might be of interest (and may actually be enough of an answer to close this out as well): https://github.com/probot/probot/issues/776
TLDR - you can add custom stream's to Probot's internal Bunyan instance, via app.log.target.addStream().
Most helpful comment
@logicbomb421 this might be of interest (and may actually be enough of an answer to close this out as well): https://github.com/probot/probot/issues/776
TLDR - you can add custom stream's to Probot's internal Bunyan instance, via
app.log.target.addStream().