Works on my system with fedmsg-hub.service. The logs go to /var/log/messages, we'd need to change /etc/fedmsg.d/logging.py to put them in a file but that's a change outside this repo.
Fixes T103
ralph | |
tflink |
Works on my system with fedmsg-hub.service. The logs go to /var/log/messages, we'd need to change /etc/fedmsg.d/logging.py to put them in a file but that's a change outside this repo.
Fixes T103
None
Lint Skipped |
Unit Tests Skipped |
This means we lose the stdout functionality but I suppose that tailing a file is functionally equivalent. Is there a sane way to use a fedmsg log file like @ralph was talking about instead of letting stuff go to /var/log/messages by default?
jobtriggers/config.py | ||
---|---|---|
27–29 | I hadn't gotten around to filing a bug about that yet - thanks for fixing it |
Here's a thought: You won't get your log output until the entire trigger_job call is done. It builds a list of output strings and returns them at the end.
You could instead use yield statements in trigger_job to yield output lines and then modify KojiJobTrigger.consume to do:
output = self.trigger.trigger_job(envr, UNIT_TYPE, task, arch) for line in output: self.log.info(line)
Is there a sane way to use a fedmsg log file like @ralph was talking about instead of letting stuff go to /var/log/messages by default?
I guess we'd need to do this (/etc/fedmg.d/logging.py): {F2117}
I guess we'd need to do this (/etc/fedmg.d/logging.py
That's not part of this diff, though. I wonder if we would be wise to include a logging.py in the source tree even if it wasn't installed with the package.
Overall, the code looks good to me. One nit about the number of logging statements for buildbot but that's a minor detail.
I'd like to see the readme updated with suggested production changes to /etc/fedmsg.d/logging.py, though.
jobtriggers/triggers.py | ||
---|---|---|
63 | I think that some of these logging statements are excessive. Status from login, force and logout in addition to url for the force request should be sufficient |
Small wording change suggestion but other than that, looks good to me
readme.rst | ||
---|---|---|
32 | one small wording suggestion: "Then replace the console handler with the filelog handler for the fedmsg logger so that log messages are sent to a separate file instead of to the console" |
I hadn't gotten around to filing a bug about that yet - thanks for fixing it