From: Carlos E. R. <rob...@te...> - 2018-10-03 11:51:32
|
On 03/10/2018 02.17, Matthias Andree wrote: > Am 03.10.18 um 00:42 schrieb Carlos E. R.: >> On 02/10/2018 21.23, Kamil Jońca wrote: >>> "Carlos E. R." <> writes: >>> >>>> On 02/10/2018 20.03, Kamil Jońca wrote: >>>>> "Carlos E. R." <> writes: >>>>> >>>>>> On 01/10/2018 20.09, Kamil Jońca wrote: >>>>>>> Matthias Andree <mat...@gm...> writes: >>>>>>> >>>>>>> [..] >>>>>>>> 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? >>>>>>> Regardless of these questions I would as NOT to change logging via >>>>>>> syslog. >>>>>> Timestamping via syslog is done by the syslog daemon, not by the >>>>>> application that sends the messages. >>>> Don't you understand? Fetchmail can not change logging via syslog. >>> Please correct me if I am wrong. >>> 1. So far fetchmail produces "log messages" >>> 2. these messages are identical, in case when logging to file/stderr or >>> syslog. >>> 3. syslog adds timestamp to messages received from fetchmail >>> 4. now we want to extend tetchmail log message with timestamps. >>> 5. so syslog will get messages with timestamps, and adds its own >>> timestamp. >>> 6. so, after adding timestamp to fetchmail messages and logging to >>> syslog we will have TWO timestamps in logs. I think this is ugly, and I >>> kindly ask Mathhias, not to change messages when someone pick "set >>> syslog" option. >> Well, I have never seen a programmer make that error in a released >> version. I'm sure they know. The message is formed, sent to syslog, or >> some extra entries are added, like a timestapmp, then printed (or >> written to file). >> >> > To calm your concerns, > > 1. I thank Kamil for the hint to make sure we don't bluntly apply > timestamping all over the map, to avoid double logging in syslog; > > 2. I thank Carlos for the trust. Carlos, rest assured that oversights > and mistakes do happen, and if the code that formats the message is > shared between syslog and fetchmail code, that concern of Kamil's is > indeed rather substantiated. And the formatting itself _is_ shared code. > O:-) See report.c for the function report(). Hans's patch, however, only > changed the file output, not the syslog output, and generated an > additional system call, and would not change the log buffer, so syslog > output would remain unadorned with the new logfile time stamp. Welcome :-) Without looking at the code, I was doing educated guesses. For instance, from my own small programs I know that if I goof at that, I will notice the error fast enough on testing it - and yes, errors do happen, but we all do tests for that reason ;-) -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas)) |