-
Notifications
You must be signed in to change notification settings - Fork 62
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 Objects or Errors is not working #49
Comments
Hi @Starfox64 -- can you reliably reproduce the error? Would appreciate a PR if you don't mind :) |
I found out I have to do it with 2 parameters in order to get it working:
|
Logging objectsI'm also facing the same issue when logging objects. In my case the console transport and file transports can both handle a JS object as the message instead of a string. e.g However for winston-graylog2 I have to set So @Starfox64 you could set the option |
Update It does work but one has to pass an object as an extra argument to the log function e.g However, given that other transports such as console and file still work when the message is in the object; it would be nice if this transport also supported this functionality. Edit: |
Hello, this issue is still persisting as of 2.1.2. Since we are relying on multiple transports, its a bit of a hassle to add objects via extra parameter only for graylog. |
Do you have a working config you can share for this. I still can't send separate fields even if I add extra parameters as an object as the last parameter. I can only log facility, full_message, level, message, source, timestamp fields. |
Folks having these types of issues on more recent releases should check out setting Winston formatters and examples in the end-to-end tests. |
antone found a solution for this?? |
When running the following script, the first test is the only one inserted in Graylog.
The text was updated successfully, but these errors were encountered: