Merge lp://qastaging/~afrantzis/lightdm/logrotate into lp://qastaging/lightdm
Proposed by
Alexandros Frantzis
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp://qastaging/~afrantzis/lightdm/logrotate | ||||
Merge into: | lp://qastaging/lightdm | ||||
Diff against target: |
473 lines (+147/-38) 16 files modified
debian/changelog (+5/-1) debian/lightdm.logrotate (+9/-0) src/Makefile.am (+3/-0) src/lightdm.c (+3/-8) src/log-file.c (+53/-0) src/log-file.h (+21/-0) src/log-mode.h (+22/-0) src/process.c (+6/-15) src/process.h (+3/-1) src/seat.c (+1/-1) src/session-child.c (+8/-6) src/session.c (+8/-2) src/session.h (+2/-1) src/unity-system-compositor.c (+1/-1) src/x-server-local.c (+1/-1) src/x-server-xvnc.c (+1/-1) |
||||
To merge this branch: | bzr merge lp://qastaging/~afrantzis/lightdm/logrotate | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Robert Ancell | Needs Fixing | ||
Review via email: mp+274718@code.qastaging.launchpad.net |
This proposal has been superseded by a proposal from 2015-10-20.
Commit message
Use logrotate to handle files in the default log directory
Description of the change
Use logrotate to handle files in the default log directory
This MP introduces support for log rotation using the logrotate tool for file in the default log directory (/var/log/lightdm). To support this scenario, existing log files in the default log directory are not moved to *.old when starting.
To post a comment you must log in.
I don't like the logic in is_log_ file_managed_ by_logrotate( ) - as well as having the log directory hard-coded this is inferring behaviour about how Ubuntu has configured LightDM.
Instead, I think open_log_file() should have a flag to say if the existing file should be backed up. For the system logs (i.e. in /var/log/lightdm, the main log, the X logs, the greeter logs etc) don't do the backup. For the other logs (session log) - do the backup.
Ideally we'd actually have a configuration item to disable log backups but it's not essential and can be added later if necessary.
Also please change the new logging code to match existing style: open_log_file() -> log_file_open()
Thanks!