~lightdm-team/lightdm/1.14

« back to all changes in this revision

Viewing changes to src/unity-system-compositor.c

  • Committer: Robert Ancell
  • Date: 2015-10-28 03:28:13 UTC
  • Revision ID: robert.ancell@canonical.com-20151028032813-yh3hnigb4b41e4bg
Add a backup-logs option that can be used to disable existing logging files having a .old suffix added to them

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
unity_system_compositor_start (DisplayServer *server)
375
375
{
376
376
    UnitySystemCompositor *compositor = UNITY_SYSTEM_COMPOSITOR (server);
377
 
    gboolean result;
 
377
    gboolean result, backup_logs;
378
378
    GString *command;
379
379
    gchar *dir, *log_file, *absolute_command, *value;
380
380
 
407
407
 
408
408
    /* Setup environment */
409
409
    compositor->priv->process = process_new (run_cb, compositor);
410
 
    process_set_log_file (compositor->priv->process, log_file, TRUE);
 
410
    backup_logs = config_get_boolean (config_get_instance (), "LightDM", "backup-logs");
 
411
    process_set_log_file (compositor->priv->process, log_file, TRUE, backup_logs ? LOG_MODE_BACKUP_AND_TRUNCATE : LOG_MODE_APPEND);
411
412
    g_free (log_file);
412
413
    process_set_clear_environment (compositor->priv->process, TRUE);
413
414
    process_set_env (compositor->priv->process, "XDG_SEAT", "seat0");