-
Notifications
You must be signed in to change notification settings - Fork 8k
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
log.Println() does not print timestamp #829
Comments
I don't know the reason behind this, rather than hiding the timestamps when printing debug information when calling But you may enable them as so:
Or, including the file and line number:
|
Thanks, it works after I did |
I think this should be reopened. If gin wants to use it's own logging format, it should use its own logger via log.New(). Under no circumstances should it be changing global settings in another package whose behavior others might depend on. |
The last comment is more than a year old, but I just stumbled across the issue as well and I'm of the same opinion as @peragwin. @bharatkrishna: Do you mind reopening the issue? Does anyone from the Gin team want to share their thoughts? |
I am using log.Println() inside the router callback functions to print debug messages. These get printed to console but they don't have timestamps. How do I enable it log timestamps?
The text was updated successfully, but these errors were encountered: