summaryrefslogtreecommitdiff
path: root/daemon/main.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@src.gnome.org>2007-05-22 14:54:31 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2007-05-22 14:54:31 +0000
commit7baf40f65e52c651aab4d2c7214672f24195a649 (patch)
tree14f7e405c17135d4112602b8d1d5ca38b24dbe5f /daemon/main.c
parentd3d96c47dcaf36e6e1206ce15af8d09068f8c2bb (diff)
downloadgdm-7baf40f65e52c651aab4d2c7214672f24195a649.tar.gz
Add command line argument --debug. Add usr1 toggle for debug. Don't read debug setting from config file.
svn path=/branches/mccann-gobject/; revision=4940
Diffstat (limited to 'daemon/main.c')
-rw-r--r--daemon/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/daemon/main.c b/daemon/main.c
index 38c82f67..936cc93e 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -497,6 +497,9 @@ signal_cb (int signo,
* Play with log levels or something
*/
ret = TRUE;
+
+ gdm_log_toggle_debug ();
+
break;
default:
@@ -532,11 +535,12 @@ main (int argc,
static GOptionEntry entries [] = {
{ "config", 0, 0, G_OPTION_ARG_STRING, &config_file, N_("Alternative GDM System Defaults configuration file"), N_("CONFIGFILE") },
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
+ { "fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &fatal_warnings, N_("Make all warnings fatal"), NULL },
{ "no-daemon", 0, 0, G_OPTION_ARG_NONE, &no_daemon, N_("Don't become a daemon"), NULL },
{ "no-console", 0, 0, G_OPTION_ARG_NONE, &no_console, N_("No console (static) servers to be run"), NULL },
{ "timed-exit", 0, 0, G_OPTION_ARG_NONE, &do_timed_exit, N_("Exit after a time - for debugging"), NULL },
- { "fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &fatal_warnings, N_("Make all warnings fatal"), NULL },
{ "version", 0, 0, G_OPTION_ARG_NONE, &print_version, N_("Print GDM version"), NULL },
{ NULL }
@@ -607,8 +611,6 @@ main (int argc,
daemon_config = gdm_daemon_config_new ();
gdm_daemon_config_load (daemon_config);
- debug = FALSE;
- gdm_daemon_config_get_bool_for_id (daemon_config, GDM_ID_DEBUG, &debug);
gdm_log_set_debug (debug);
gdm_daemon_change_user (&gdm_uid, &gdm_gid);