-
Notifications
You must be signed in to change notification settings - Fork 2
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
Space handling in kwargs output #33
Labels
bug
Something isn't working
Comments
Arkoniak
pushed a commit
to Arkoniak/MiniLoggers.jl
that referenced
this issue
May 4, 2022
Arkoniak
pushed a commit
to Arkoniak/MiniLoggers.jl
that referenced
this issue
May 4, 2022
Unfortunately it is impossible to generate last test case, due to the way, how Julia prepares julia> @info x = 3 y = 1
┌ Info: 3
└ y = 1 First argument always stripped to it's value and considered as message itself. Only way to overcome it, that I can find now, is to add empty string at the beginning of the log string julia> @info "" x = 3 y = 1
┌ Info:
│ x = 3
└ y = 1 or the same in MiniLoggers.jl julia> with_logger(MiniLogger()) do
@info "" x=4 y=2
end
[2022-04-29 10:55:19] Info: x = 4, y = 2 |
Thanks for handling this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As it was mentioned in #19 (comment) by default logger does not print space between message and keyword arguments:
Relevant piece of code is: https://github.com/JuliaLogging/MiniLoggers.jl/blob/master/src/minilogger.jl#L242-L253
Proper behavior should be:
Additional test cases:
There should be no extra space when there are no keywords present:
And there should be no extra space when there is no text message:
The text was updated successfully, but these errors were encountered: