-
Notifications
You must be signed in to change notification settings - Fork 22
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
Remove dash-space prefix from JSON log messages #7
Comments
Can you send me an example config and output so I'm sure I am looking at the issue? |
Hi My config is this:
And these are the JSON log messages I get on the syslog server:
|
I took a look at the issue. It appears that this dash is the syslog field for msg_id. That field is used for provided a particular code for a log message (e.g., ERR_42 "file not found") It's inserted by the library when none is provided: I'm not exactly sure if it's appropriate to include here. Perhaps the msg_id should be the event type? If that change were made, then the dash would be replaced with "command_finish" and "command_start" in your example. In either case, you'd need to configure your syslog receiver to parse it. |
Thanks for looking into this and the short write-up. I'll handle this on my log processors then. |
Hi
Is there a specific reason for the dash-space prefix in sshlog's log messages? It's an issue when JSON logs are fed into log collection/processing systems because they recognize the messages as invalid JSON because of that prefix. Could you remove it from the JSON log messages?
thx & best regards
ron
The text was updated successfully, but these errors were encountered: