On Fri, Mar 14, 2025 at 10:42:00AM +1300, Bryan Christianson wrote: > I see I can use the '-l file' option of chronyd to log the messages to a > file, but I have a few questions. > > 1. Does the location of 'file' use the LogDir directory by default?
No, logdir is only for the logs enabled by the log directive. > If not, is there any problem in using that directory? My preferred location > for the file would be in /var/log/chrony directory with a title of > chronyd.log. I think that's fine, except the directory already needs to exist as the log is opened before chronyd checks/creates the logdir directory. > 2. Can the log be rotated (i.e. closed then renamed) without restarting > chronyd? This facility is available via chronyc for the measurement, tracking > etc logs but I think that probably doesn't apply to syslog files. Would be > really nice if it did. The trouble with that is chronyd might no longer have the permissions needed to do that. It opens the file very early when it still has root permissions. Maybe it could try to open the file for the second time and only if that succeeds, replace the original handle. -- Miroslav Lichvar -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.