-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Log format is difficult to parse #1446
Comments
The original indentation gave us very easy visibility when the UI would output something using the You should still be able to get multi-line to work. The Hope that helps! |
Closing this out per the suggestion in #1446 (comment). |
@slackpad should the interactive use case drive the user experience? I'd argue that the automated log collection and analysis is way more common than "the operator looking at the console output" and therefore an easily machine consumed format should be the standard. |
@mterron that's a fair point, though these are only shown a startup, which is pretty common for people to see interactively when people are using to learn Consul. We can revisit this if we change to a different logging library that may also support more structured logging / alternate formats. I don't have an ETA on that, but it is something we are thinking about. |
That's good to know @slackpad . Just removing the indentation from the beginning of log lines will make consumption much easier without being a major change I think. Cheers |
Hmm - I'll kick this open again for now. |
Since it's still being considered, the date in ISO8601 format would be great! I'll dig into the code and see if I can come up with a painless PR. |
OK, I'm the worst golang practitioner ever (read as this is the first time I tried to do anything with it). To format the date, this seems to work without using any fancy packages: I'm not quite sure where I can use that snippet within Consul though. @slackpad can you take a look? Seem to be a simple change but I don't know about how to integrate with the consul codebase. Thanks! |
Just in case someone out there is trying to get logs parsed...
|
Similar to @michalgasek , this config has been working well for filebeat... (with all of the puppet-config goodness...):
|
Hii all, |
@mrwulf You probably meant |
This has improved dramatically since using |
I'm reopening, the log messages format is still difficult to parse and unnecessary indented. My expectation is that:
Thank you for considering. |
The log format produced by consul is rather difficult to parse when attempting to build a multiline filter pattern for logstash. I have several different applications submitting their logs to the server and therefore would like an standardised pattern. Due to consul adding spaces to log messages, it causes problems when defining the pattern.
consul/command/agent/command.go
Line 554 in 8defe75
Example Filter
Example Log Output
Expected Log Output
The text was updated successfully, but these errors were encountered: