Update copyright year. Fix a typo in logging.
[umurmur.git] / src / log.c
index f3bfea6f2939314807875d62b70d1f9cfe813cf8..9eb5981d1ea9d01a67683fbf0d24109018e1dd9e 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009, Martin Johansson <martin@fatbob.nu>
-   Copyright (C) 2005-2009, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2010, Martin Johansson <martin@fatbob.nu>
+   Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
 
    All rights reserved.
 
@@ -45,7 +45,7 @@ void Log_init(bool_t terminal)
 {
        termprint = terminal;
        if (!termprint)
-               openlog("uMurmud", LOG_PID, LOG_DAEMON);
+               openlog("uMurmurd", LOG_PID, LOG_DAEMON);
 }
 
 void Log_free()
@@ -84,7 +84,7 @@ void Log_warn(const char *logstring, ...)
        if (termprint)
                fprintf(stderr, "%s", buf); /* XXX - other targets for logging */
        else
-               syslog(LOG_ALERT, buf);
+               syslog(LOG_WARNING, buf);
 }
 
 void Log_info(const char *logstring, ...)
@@ -101,7 +101,7 @@ void Log_info(const char *logstring, ...)
        if (termprint)
                fprintf(stderr, "%s", buf); /* XXX - other targets for logging */
        else
-               syslog(LOG_ALERT, buf);
+               syslog(LOG_INFO, buf);
 }
 
 #ifdef DEBUG
@@ -119,7 +119,7 @@ void Log_debug(const char *logstring, ...)
        if (termprint)
                fprintf(stderr, "%s", buf); /* XXX - other targets for logging */
        else
-               syslog(LOG_INFO, buf);
+               syslog(LOG_DEBUG, buf);
 }
 #endif
 
@@ -136,6 +136,6 @@ void Log_fatal(const char *logstring, ...)
        if (termprint)
                fprintf(stderr, "%s", buf); /* XXX - other targets for logging */
        else
-               syslog(LOG_INFO, buf);
+               syslog(LOG_CRIT, buf);
        exit(1);
 }