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
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.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

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!

Revision history for this message
Robert Ancell (robert-ancell) :
review: Needs Fixing
2218. By Robert Ancell

Allow guest sessions to write in /{,var/}run/screen folder, so they can launch screen terminals (needed for e.g. Epoptes to open remote clients' terminals).

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> 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.

OK. Let me know if the following plan sounds good:

1. process_set_log_file() and session_set_log_file() will get a flag about whether to perform a backup or not, or alternatively we can add *_set_log_file_backup(..., gboolean backup)
2. Session will perform a backup by default (since their default log file is .xsession-errors)
3. At all invocations of *_set_log_file() in the current code the flag will be set to FALSE (don't backup), since all of them are considered system logs (in the current code session logs use the default log value of Session)

> 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()

Ack.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Sounds good!

2219. By Launchpad Translations on behalf of lightdm-team

Launchpad automatic translations update.

2220. By Robert Ancell

Set example multi-seat configuration to a valid seat name

2221. By Robert Ancell

Update guest-session AppArmor profile to be suitable for openSUSE

2222. By Alexandros Frantzis

Use logrotate to handle files in the default log directory

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches