-
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
TypeError: cleanedMessage.substring is not a function #73
Comments
@shuat can you show an example (I mean the code that fails) how you log an object using this transport? So that I can quickly see what's the issue. |
@shuat AFAIK, it's possible to log objects with this transport, but an object must have some certain fields (message, etc.). See: https://github.com/namshi/winston-graylog2#upgrading-from-earlier-versions-of-winston-graylog2
|
I have the same error and no idea how to resolve it or why it occurs.. |
I'm facing same error while using following code:
|
I think I know the problem. The winston-graylog2 code does this ...
If |
I try to send a logger.info({'hello': 123}), just to test it and you are right, it fails with the exactly error on issue name. As a work around, I just check my messages type, and if is an object I convert it using JSON.stringify(message) |
It seems that this transport does not allow for logging of objects. Winston which this is built for allows logging of object and so does console.log.
The text was updated successfully, but these errors were encountered: