-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Hello Cloudflare team,
Currently, cloudflared always outputs log timestamps in UTC with ISO 8601 format, for example:
{"level":"info","time":"2025-09-07T13:19:18Z","message":"Registered tunnel connection"}
Even when the system timezone or the TZ environment variable is set (e.g., TZ=Asia/Shanghai), cloudflared continues to log in UTC.
For users who run cloudflared on systems with a local timezone configured, it would be very helpful to have an option to use local time (or specify a timezone) in log output. This makes it easier to correlate logs with other local services and system events.
Feature Proposal:
Add a flag or config option, for example:
--log-local-time (boolean) or --log-timezone <tz> (e.g., Asia/Shanghai) or use environment timezone (e.g., export TZ=Asia/Shanghai)
When enabled, log timestamps would be converted to the specified timezone instead of always using UTC.
This feature would make debugging and monitoring easier for users who prefer to see timestamps in their local time.
Thank you for considering this improvement!