Bug 963542

Summary: daemons should log to syslog instead of using ConcurrentLogHandler
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.12CC: aigao, asaha, dcallagh, jingwang, llim, qwan, rmancy, xjia
Target Milestone: 0.14Keywords: FutureFeature, TestCaseApproved, TestCaseProvided
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-09 03:24:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Callaghan 2013-05-16 06:26:08 UTC
ConcurrentLogHandler has caused us a fair bit of grief since we switched to it (for example bug 952929, bug 858922, bug 856850). It's messy and fairly wasteful, acquiring and releasing a flock for every log entry written.

We could greatly simplify Beaker's logging by sending everything to syslog instead. There would be no need to configure log levels or log rotation on the Beaker side anymore, each daemon would just choose between logging to stderr in the foreground or syslog when backgrounded. Log level filtering and storage would be the syslog daemon's job. We could ship a config file in /etc/rsyslog.d which sets up the same log destinations as we currently have, and a config file in /etc/logrotate.d which sets up the same rotation.

The only downside I can see so far is that syslog can only log one line at a time, so tracebacks for exceptions would need to be split into a separate log message for each line. That's fine, it just means that two concurrently logged tracebacks may be interleaved with each other. I don't see that as a serious problem though.

Comment 1 Dan Callaghan 2013-05-16 06:27:55 UTC
Also in future, when Beaker can assume the presence of systemd, we would be able to swap out syslog for the journal API. The systemd journal gives us the same functionality as syslog+logrotate but with heaps of other niceties on top as well.

Comment 2 Dan Callaghan 2013-07-17 03:42:34 UTC
On Gerrit: http://gerrit.beaker-project.org/2080

Comment 7 Dan Callaghan 2013-08-09 03:24:17 UTC
Beaker 0.14.1 has been released.