fgm / filog

A fine logger package for Meteor.JS applications (client + server)
GNU General Public License v3.0
18 stars 6 forks source link

Question about need for "DevSender" #42

Open arggh opened 6 years ago

arggh commented 6 years ago

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?

fgm commented 6 years ago

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 ?

arggh commented 6 years ago

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

fgm commented 6 years ago

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.