winstonjs / winston-loggly

A Loggly transport for winston

Home Page:http://github.com/indexzero/winston-loggly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logging object

dariospadoni opened this issue · comments

Hello
Is logging of objects/json supported?
Winston allows to log something like this:

winston.log('info', 'Test Log Message', { anything: 'This is metadata' })

but I don't see any logs into loggly unless I pass only string as parameter. So if error is a JSON object, this will not be logged:

logger.error 'Error creating order', error

unless I explicitly call .toString() on error object.

+1 on this. I'm running into this issue as well.

Vote for that

Stupid question: have you set { json: true } in the options (cf. https://github.com/nodejitsu/node-loggly#logging-json-objects) ?

@pcothenet: setting { json: true } works (and I changed the configuration in that way) but it will change also the output of the log