Bug 963542 - daemons should log to syslog instead of using ConcurrentLogHandler
Summary: daemons should log to syslog instead of using ConcurrentLogHandler
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.14
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-16 06:26 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-09 03:24:17 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.