From: Matthias A. <mat...@gm...> - 2018-10-01 18:00:23
|
Am 01.10.18 um 19:19 schrieb Hans Carlson: > Someone a bit more enterprising than me could probably submit a patch > with some kind of config file option (eg. log_timestamp) to do > something similar. It would be wise to also add a config file option > that specified the format for the timestamp, with the default > timestamp something more universally acceptable and standard than the > format I used. Hi Gene, Hans, everybody else, I'd be bold (as the maintainer) and share the insight that adding options is an expensive process. It requires options parsing, twice (command line, and rcfile), option dumping, at that, documentation, testing, string translations, future compatibility considerations - for a few lines of code around strftime() and gmtime() calls we'd easily add 100 lines over the place for making things configurable. I am somewhat inclined to take a variant of your (Hans's) patch and make it emit ISO8601 formatted time stamps, in UTC (to avoid ambiguity of 2:05 A and 2:05 B in the night when the DST is switched off), and that's it. The alternative would be a plain timestamp (seconds since UTC Epoch or something) that would require further formatting through an external program---but then again a program that translated ISO8601 UTC timestamps to an arbitrary local time zone wouldn't have to be much more than a few lines of Perl. The consideration is whether this could go into 6.4, or would have to wait for 7.0. The log file format is not really specified, so changing it isn't breaking any documented interface, just breaking past practice, so it might cause some astonishment. Opinions? Best regards, Matthias |