Bug 62161 - no way to ensure error log contains timezone in timestamps
Summary: no way to ensure error log contains timezone in timestamps
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.6
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-06 21:06 UTC by James Ralston
Modified: 2018-03-06 21:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Ralston 2018-03-06 21:06:25 UTC
[I'm filing against 2.4.6, because this is the version of httpd included in Red Hat Enterprise Linux 7, where I've performed testing. But based on the documentation, I suspect this bug applies to all point releases in the 2.4 series, and additionally to 2.5-HEAD.]

We use the Splunk platform to analyze logs (including Apache httpd logs) that are combined across multiple hosts distributed across different time zones.

For this reason, it is critical to us that all timestamps in all logs contain timezone information.

For LogFormat, the %t format string includes the timezone offset from GMT. Additionally, a strftime(3) format string can be used with %{format}t. So for normal httpd logs, we have timezone offset information in the timestamps.

But, inexplicably, for ErrorLogFormat, the %t format string produces completely different output than LogFormat's %t format string, and that output doesn't include the timezone or timezone offset.

Furthermore, there is no %{format}t formatting string for ErrorLogFormat (as there is for LogFormat), and none of the other available ErrorLogFormat time formatting strings (%{u}t, %{cu}t) include the timezone or timezone offset.

This effectively means it is impossible to have httpd error logs that contain either timezone or timezone offset information in their timestamps.

This is a deficiency with ErrorLogFormat that should be corrected—ideally, by making ErrorLogFormat use the same time-related formatting strings as LogFormat, and by making them produce the same output.