-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fixes #30278 - Fix missing newlines in logs #70
Conversation
Isn't better just to add newline in the formatter? And what the new logging stack has anything to do with this? Isn't this just a bug? |
Now matter what I tried this yielded the best results. In some places I was getting a single newline for some messages and two for others, in another place I was getting 0 and 1.
The bug doesn't seem to be present when running with the new logging stack. |
Cant you just "chomp" the input (that's fast operation) and add a newline? |
I could do that, but then we end up with log which has newlines, but is missing other things such as timestamps
How about this 5b87612? |
We have the same discussion in core - is it good to have multiline comments or not? We ended up with our own formatter which adds https://github.com/theforeman/foreman/blob/develop/lib/foreman/logging.rb#L244-L255 There is an ongoing discussion if we want to prepend also the prefix from our normal formatter. You can do that as well, although I do not like the idea as it can look weird in ElasticSearch, it is very convinient when you are grepping logs for example for session id. |
Ping - do you like my proposal? :-) |
Sorry, this somehow slipped under my radar. Let's go with adding just |
Are you suggesting we do it as part of this or do it in #61 ? |
True I could do that during the refactoring. Let's merge this, it's better than it was. |
Before:
After:
This is just a temporary workaround until #61 gets in