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
Ability to use Err() method without Msg() #410
Comments
I am also bothered by this, but it is not because of
The issue is bad interaction between
One is appending space delimiter, the other one is prepending. Also, I think |
I made #413 to fix this. |
Why don't we make it possible to use
Sorry to ask this without looking at the codebase. Thanks. |
So there are two parts to this issue. One is that previously (before this issue was closed), there was an extra space printed when there was no message just error. This has been fixed. The other is how to log just an error. For that, you can just use |
Didn't realize there's |
Hi guys.
There's one frustrating thing with logger.
Let's see the code:
Program continues after calling the Fatal().Err() method. But when I add Msg() method, like
logger.Fatal().Err(err).Msg("")
- everything works as expected.The same thing with
logger.Error().Err(err)
. Error is not displayed in the log.But. Let's compare output of Info log and Error log with Msg:
You may see one extra space at the beginning of error line. It's a bit strange.
Could you please add possibility to call
Err()
method withoutMsg()
? Or at least, delete extra space? ;)The text was updated successfully, but these errors were encountered: