Skip to content
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

modern-syslog #453

Closed
atis-- opened this issue Oct 25, 2016 · 2 comments
Closed

modern-syslog #453

atis-- opened this issue Oct 25, 2016 · 2 comments
Assignees
Labels

Comments

@atis--
Copy link

atis-- commented Oct 25, 2016

Hi!

I was wondering what are your thoughts on pointing prospective syslog (via bunyan) users to the modern-syslog library made by StrongLoop?

Recent build problems with the node-bunyan-syslog library (the only linked syslog solution currently) prompted me to look at other things.

What's interesting is that, according to modern-syslog README, the <syslog.h> calls may block, and so cause a slowdown under load. They work around this by using AsyncWorker utilities.

Since modern-syslog also provides a stream interface, using it with bunyan is dead simple:

const bunyan = require('bunyan');
const syslog = require('modern-syslog');

const log = bunyan.createLogger({
    name: 'myapp',
    stream: syslog.Stream(syslog.LOG_WARNING, syslog.LOG_USER),
    level: 'warn'
});

log.warn({ your: 'data' }, 'Hello, world!');
@trentm
Copy link
Owner

trentm commented Oct 25, 2016

@atis-- I've moved the "third-party streams" content to a wiki page so it can be more easily edited by others (I'm often a bottleneck). I'd love if you could add a link to that syslog module here: https://github.com/trentm/node-bunyan/wiki/Awesome-Bunyan and then perhaps also a link to a new wiki page with the above content showing how to use it with Bunyan (or even just a link back to this issue).

@atis--
Copy link
Author

atis-- commented Jan 11, 2017

Ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants