strongloop / modern-syslog

modern-syslog
Other
49 stars 19 forks source link

Initial #1

Closed sam-github closed 9 years ago

sam-github commented 9 years ago

@bnoordhuis PTAL In particular at core.cc.

I'm wondering if I should be implementing two versions of core.syslog, one that takes a buffer, one that takes a String, and then dispatching between them like fs does. Is that the right way? I thought I'd be able to find out if the msg argument was a Buffer in C++, and do it there, but I'm not successfully figuring out how to do that.

The syslog() core function is most likely going to get called with a String mostly, but in the case of a writeable stream, it will be a Buffer. I could ask the stream base to not convert strings to buffers, then I could get either String or Buffer and treat them differently - should I do that?

sam-github commented 9 years ago

@rmg PTAL, I'm tired of maintaining our fork of node-syslog, I'm planning on replacing it with this.

rmg commented 9 years ago

You should add a test or two with multi-line input to see what it does.