Skip to content
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

add forgotten '...' in logger.Fatal #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vladvelici
Copy link

@vladvelici vladvelici commented Sep 21, 2022

I've noticed that log.Fatal(msg, err) messages are actually missing the err in the logs.

For this code

log := unalogger.New("yo")
log.Fatal("hello", fmt.Errorf("world"))

I expected to see something like this in the output (which is what we get with this patch)

17:31:34.004229 CRITICAL yo hello error: world

but instead I found this

17:28:27.413387 CRITICAL yo hello _: [error map[]]

I noticed it works just fine for log.Error, and the only difference was the missing "...", causing the arguments slice to be interpreted as the first argument.


Please read using git and contributing guidelines ⤵️ before submitting code. (It's at the bottom of the page)
Screenshot 2022-08-19 at 09 46 50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant