filog icon indicating copy to clipboard operation
filog copied to clipboard

Question about need for "DevSender"

Open arggh opened this issue 7 years ago • 3 comments

I have been using FiLog with a custom sender when in development mode, "DevSender", which will log to the console, but only produces one line per log event. This way my console doesn't get obfuscated by the 30-50 lines-per-entry log messages.

It's just a minor difference compared to the ConsoleSender, but I was wondering if it's useful or different enough to be added?

arggh avatar Dec 09 '17 18:12 arggh

Sounds interesting: since it's essentially an extension of the ConsoleSender, it looks like it could be merged into it as an option, doesn't it ?

fgm avatar Dec 10 '17 10:12 fgm

Sure, I'll try to work in a PR. Do you have an idea how this option should be specified?

arggh avatar Dec 10 '17 11:12 arggh

Senders take their options in their constructor (look at SyslogSender for an example: https://github.com/FGM/filog/blob/master/src/Senders/SyslogSender.js#L45 ). Just be sure to provide defaults matching the current behavior when no options are passed.

fgm avatar Dec 10 '17 11:12 fgm