Bug 963542 - daemons should log to syslog instead of using ConcurrentLogHandler
daemons should log to syslog instead of using ConcurrentLogHandler
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
0.12
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.14
: ---
Assigned To: Dan Callaghan
: FutureFeature, TestCaseApproved, TestCaseProvided
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 02:26 EDT by Dan Callaghan
Modified: 2018-02-05 19:41 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-08 23:24:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2013-05-16 02:26:08 EDT
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 02:27:55 EDT
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-16 23:42:34 EDT
On Gerrit: http://gerrit.beaker-project.org/2080
Comment 7 Dan Callaghan 2013-08-08 23:24:17 EDT
Beaker 0.14.1 has been released.

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