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

consider removing the empty colon (:) when message is empty #109

Closed
marco-m opened this issue Apr 12, 2022 · 5 comments
Closed

consider removing the empty colon (:) when message is empty #109

marco-m opened this issue Apr 12, 2022 · 5 comments

Comments

@marco-m
Copy link
Contributor

marco-m commented Apr 12, 2022

Hello,

consider the case when you don't really have a message, just a list of k/v pairs:

log.Debug("", "dbVersion", dbVersion)

this will print

2022-04-12T21:24:54+0200 [DEBUG] myprog: : dbVersion=0

I would like instead to see simply:

2022-04-12T21:24:54+0200 [DEBUG] myprog: dbVersion=0

What do you think?

@evanphx
Copy link
Contributor

evanphx commented Apr 21, 2022

Agreed!

@marco-m
Copy link
Contributor Author

marco-m commented Apr 27, 2022

thanks @evanphx !

@marco-m
Copy link
Contributor Author

marco-m commented Jul 14, 2022

hello @evanphx, I am confused.

I realized that commit 78f517c is actually on branch f-no-colon, which is unmerged, while this issue is closed.
Since the issue is closed and there is no associated PR, is the f-no-colon branch risking to be forgotten?

Thanks :-)

@evanphx
Copy link
Contributor

evanphx commented Jul 25, 2022

That was weird of me. I'll get that moved over now.

evanphx added a commit that referenced this issue Jul 25, 2022
Omit empty colon when message is empty. Fixes #109
@marco-m
Copy link
Contributor Author

marco-m commented Jul 25, 2022

Thanks!

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

No branches or pull requests

2 participants