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
logfile can not output localtime #5019
Comments
(I'm not sure why the docs aren't rendering for this property, but) you can customize the time format: https://caddyserver.com/docs/json/logging/logs/encoder/json/time_format/ |
See https://caddyserver.com/docs/caddyfile/directives/log#format-modules for the supported time format options. I'm not sure if any of those actually use the timezone though, it might just always be UTC. |
Those are just presets. You can use any Go-supported time format, which lets you choose the time zone: https://pkg.go.dev/time#pkg-constants |
I don't study Golang.
|
Yep, so it's what we told you 👍 Just put in a format that works for you. (Link above describes the format.) |
sorry, I mean that the time is UTC in logfile, I want Local. |
I can't set the time is Local in log file,
|
hi guys, I can not output the localtime in the caddy log file.
the TS alway display UTC.
the server timezone is set,
the log content
The text was updated successfully, but these errors were encountered: