timestamp lacks year when logging to file

Issue #894 resolved
Alexander Dahl created an issue

Monit can log to file or to syslog, if the directory “set log” is in your rc file. According to the documentation (and the source) the format is fixed and contains a [date] part like this: [CET Jan 5 18:49:29]

This is ambiguous for long running systems, especially in the embedded world devices might run over years without outage. You can not tell for certain from the log file when a certain event has happened, because there is no year in the time stamp. You can also not tell if the time is set to a reasonable value on that device for the same reason: Is it 1970 (quite common for devices without Real Time Clock (RTC)) or 1984 or 2020? You don’t know, at least not when looking at the Monit logfile.
Please make this either configurable or set it to a sane format, e.g. like proposed by ISO standard 8601, for example:

% date --iso-8601=seconds   

This affects all versions known to this Git repo, the current timestamp format has not changed since the very first commit.

Comments (2)

  1. Log in to comment