diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-03-25 14:10:32 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-03-25 14:10:32 -0400 |
commit | f9a5229aa7f1eae3a0481a41e88d7edbc15a649c (patch) | |
tree | c22015f618fc997cad0777d98086bd2241d9d242 /src/main.c | |
parent | 18778b2ad5e0d1fc412600b0f2481dc957359375 (diff) |
Refactor logging into separate files
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -22,8 +22,10 @@ #include "config.h" #include <stdlib.h> +#include <stdarg.h> #include <locale.h> #include <libintl.h> +#include <syslog.h> #include <glib.h> #include <glib/gi18n.h> @@ -183,6 +185,11 @@ main (int argc, char *argv[]) if (daemon == NULL) goto out; + openlog ("accounts-daemon", LOG_PID, LOG_DAEMON); + syslog (LOG_INFO, "started daemon version %s", VERSION); + closelog (); + openlog ("accounts-daemon", 0, LOG_AUTHPRIV); + loop = g_main_loop_new (NULL, FALSE); g_print ("entering main loop\n"); |