#3537 Switch to WatchedFileHandler for logger
Merged by tkopecek. Opened by tkopecek.
tkopecek/koji issue3392  into  master

Download 3537.patch

Related: https://pagure.io/koji/issue/3392

@mikem using option here means that we need to load options and only after that enabling logger. So, losing errors from config parsing. I was thinking about putting default handler first and then reattaching it after options are parsed?

The in-koji log_rotate option seems kind of hardwired, and I don't think it is necessary for the original issue. If we just start by just switching to WatchedFileHandler, we can duck the chicken/egg issue with loading options and keep the change very simple.

It might make sense to add in-koji logrotate in a follow-up, but I think if we want to offer this feature, it might take to time to get right. We'd probably want to support more control for the rotate parameters rather than hard-coding them in add_file_logger, and of course address the config bootstrap issue, likely similar to what we do in kojihub.

I believe we decided to go with the simpler option of just switching to WatchedFileHandler as described in last comment.

rebased onto 296d2cb17032b201a65f934705b84a2692d5576e

:thumbsup:

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

Commit 37d9b5f4 fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata