Wylio / meteor-winston-papertrail

A Winston Papertrail transport for Meteorite on top of Meteor.
2 stars 0 forks source link

Question: Is there an easy way to integrate this with console.log? #4

Open elie222 opened 8 years ago

elie222 commented 8 years ago

I just added this package to my app. I do console.log's all over the place already. Is there an easy way to replace the current console.log's with this package's?

Most importantly is the code that can run on both client and server. For server code I can use the new log object I've added and then do log.info(), but what is the recommended usage for client?

batjko commented 8 years ago

I was wondering the same thing. The most straight-forward "Meteor" thing would be to wrap the call into a Meteor method, which you can then call everywhere.

But that's clunky, because you'd have to deal with the different log levels explicitly and all that.

I suppose, alternatively you could simply re-implement the winston-papertrail (non-Meteor) just for the client side, but re-use the same config settings. I haven't tried that though.