From: Matthias A. <mat...@gm...> - 2020-09-12 16:40:51
|
Am 12.09.20 um 01:34 schrieb grarpamp: >> * fetchmail, with --logfile, now logs time stamps into the file, in >> localtime >> and in the format "Jun 20 23:45:01 fetchmail: ". It will be localized >> through >> the environment variables LC_TIME (or LC_ALL) and TZ. > Applications, especially logging functions aka: not human > GUI apps... should generally at least first consider using > the unambiguous, universal, programmatic, parseable, > sortable, human readable, locality independent, international > exchange friendly, timezone clear, international standard > iso8601 format timestamps. The standard was created for that. > strftime(3) format can then be easily modified by user > to whatever their nonstandard local or personal preference > or legacy systems need by a configuration setting or > environment variable, including any formats beyond > those in LC_TIME. Ah well. What a nuisance. There is always someone you haven't pleased. If you print ISO8601 format, you see people nag about the embedded T, about the unusual ordering and whatnot, someone will want the time zone offset printed, the next person won't. We've had that story with daemon mode and "sleeping at" and "awakened at". Some people want that in the logs, others don't. As if there were no grep, no logrotate, no nothing. Add free-form customization and people will complain that first setup is hard... If you don't like the traditional format, then patch the strftime(). That's one reason what you have the source code, you know... In the end if you make it customizable and documentation takes up an order of magnitude more room than the actual code... Option parser, report back, configuration plausibility checking, code to parse, man page entry and it all boils down to keep people dependent. I don't really know why we need logfile with all the related management code when we have standard I/O and syslog options already. It's been there when we took over post-6.2.5 code ages ago, and that's why it's still in 6.x.y. Perhaps I should put --logfile it on the deprecated option list for 7.x to avoid any further discussion. |