powerd debug messages flood powerd upstart log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
powerd |
Fix Released
|
Medium
|
Seth Forshee | ||
powerd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There have been reports from various developers about the fact that powerd's approach to logging results in the powerd upstart log file being very large compared to the other upstart job log files. Looking at one of my phones running a recent image ( build 152 ), the powerd upstart log is about 3 times the size of the next largest log file ( one of the system network jobs ).
This is a result of powerd using GLib logging, but not actually setting up a default log handler, so the default log handler is used, which writes all messages to stdout/stderr, which results in the log messages going to the upstart log vs. the normal system syslog. The fix is simply to configure a log handler which writes to syslog:
https:/
Before a log handler is added, it also would be wise to ensure that the logging verbosity can be controlled via a command-line switch ( eg. -d ) or environment variable ( eg. POWERD_DEBUG=TRUE ).
Related branches
- Matt Fischer (community): Needs Information
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 823 lines (+202/-94)9 files modifiedCMakeLists.txt (+1/-0)
debian/upstart (+1/-1)
src/display-request.c (+19/-17)
src/display.c (+22/-21)
src/log.c (+53/-0)
src/log.h (+45/-0)
src/power-request.c (+33/-31)
src/powerd-object.c (+10/-9)
src/powerd.cpp (+18/-15)
Changed in powerd: | |
assignee: | nobody → Seth Forshee (sforshee) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in powerd: | |
status: | Fix Committed → Fix Released |
Fix committed into lp:powerd at revision 42, scheduled for release in powerd, milestone ubuntu-13.05