-
Notifications
You must be signed in to change notification settings - Fork 517
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 log output handler plugins to bunyan cmd #9
Comments
Thinking about it a bit more - it may make more sense just to pipe the output through something that already does all of this, eg logstash - but I'll leave this issue open in case you guys do wanna consider it. |
Currently the intention of the That said, one thing that would be useful is to extract the code from the I'm not opposed to a plugin mechanism for the bunyan CLI (that would allow this). |
This issue seems to be about bunyan CLI, but is there any Loggly integration for the bunyan library? I see it has support for streams, but that's a bit different than making (ideally, batched) HTTP requests. I also see there's https://github.com/mcavage/node-bunyan-syslog and Loggly supports syslog, but syslog is plaintext, while the whole goal of bunyan is JSON logging. =) Thanks in advance! |
I think node-bunyan-syslog is just logging the serialized JSON as the "plaintext". You can watch the syslog events (bunyan log records) on the other end and pretty-print with the Loggly: a node-bunyan-loggly module would be appreciated. I don't use loggly so am unlikely to write one soon. A custom bunyan stream should make it straightforward to write to Loggly... including buffering bunyan records to make batched HTTP requests to loggly. This shows a quick example of a custom bunyan stream: https://github.com/trentm/node-bunyan-winston/blob/master/restify-winston.js#L18-L74 You could add batching to the |
Any further progress on this one? I'd also like to use Bunyan with Loggly. |
Well, someone's tried it: https://github.com/smebberson/bunyan-loggly |
Cool, thanks. I'll check it out. |
@trentm what is the "correct" way to add handler plugins? I'm looking into bunyan-logstash. However, I noticed that a similar library (bunyan-loggly) integrates itself into bunyan much differently. A real implementation of plugins for streams and documentation would be nice. Either way, between the two libraries, which integration with bunyan would you prefer? Basically, a |
Should I close this? Hasn't been any real updates on it in a while. |
I think so. |
Currently the
bunyan
cmd has a number of fixed output modes (OM_PAUL
,OM_JSON
, etc).It would be great to be able to plug in custom handlers and filters (based on property matching/globbing or whatever). This is actually described briefly in this blog post:
You can currently just patch the
handleLogLine
function to do this using your own custom logic, but it would be nice if a cleaner mechanism was supported out of the box.The text was updated successfully, but these errors were encountered: