#3392 kojid/kojira logging does not play nice with logrotate
Opened 2 months ago by mikem. Modified 2 months ago

kojid a long-lived process and logs to /var/log/kojid.log. Many configurations use logrotate on these logs, which can result in the file handler kojid has open pointing to the wrong file (e.g. the .$N logfile, or even a deleted file).

I believe this can be easily addressed by using logging.handlers.WatchedFileHandler, though we might want to make this configurable for compatibilities sake.

kojira suffers the same problem.


What do you think about just logging to stdout? Then you get all the features from systemd's journal

What do you think about just logging to stdout? Then you get all the features from systemd's journal

The systemd config we ship runs kojid with --fg, which cause it to log to stderr (in addition to kojid.log), so we're actually getting both right now. Same with kojira.

It's probably worth adjusting this and giving the admin more control of where the logs go. Arguably, with --fg we probably only log to stderr or just stdout.

While systemd seems nearly universal anymore, I'm not sure I want to require it. Providing simple config for log destination seems pretty straightforward.

Metadata Update from @mikem:
- Custom field Size adjusted to None

2 months ago

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.31

2 months ago

Login to comment on this ticket.

Metadata