Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging object #27

Open
dariospadoni opened this issue Apr 24, 2015 · 4 comments
Open

Logging object #27

dariospadoni opened this issue Apr 24, 2015 · 4 comments

Comments

@dariospadoni
Copy link

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.

@ksmithut
Copy link

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

@yetithefoot
Copy link

Vote for that

@pcothenet
Copy link

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

@dariospadoni
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants