[runtime] Fix DISABLE_REFLECTION_EMIT build.
[mono.git] / mono / utils / mono-log-posix.c
index 1ce111c1762e2ee67fea21015345fa6ea4c7ffdb..a7968265ac6eaa3677225eadf33538668dbcbf64 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-log-posix.c: POSIX interface to the logger
+/**
+ * \file
+ * POSIX interface to the logger
  *
  * This module contains the POSIX syslog logger routines
  *
@@ -25,7 +26,7 @@
 #include <errno.h>
 #include <time.h>
 #include <sys/time.h>
-#include "mono-logger.h"
+#include "mono-logger-internals.h"
 
 static void *logUserData = NULL;
 
@@ -54,13 +55,11 @@ mapSyslogLevel(GLogLevelFlags level)
 }
 
 /**
- * mono_log_open_logfile
- *     
- *     Open the syslog interface specifying that we want our PID recorded 
- *     and that we're using the LOG_USER facility.
- *
- *     @ident - Identifier: ignored
- *     @userData - Not used
+ * mono_log_open_syslog:
+ * \param ident Identifier: ignored
+ * \param userData Not used
+ * Open the syslog interface specifying that we want our PID recorded 
+ * and that we're using the \c LOG_USER facility.
  */
 void
 mono_log_open_syslog(const char *ident, void *userData)
@@ -70,28 +69,25 @@ mono_log_open_syslog(const char *ident, void *userData)
 }
 
 /**
- * mono_log_write_logfile
- *     
- *     Write data to the log file.
- *
- *     @domain - Identifier string
- *     @level - Logging level flags
- *     @format - Printf format string
- *     @vargs - Variable argument list
+ * mono_log_write_syslog:
+ * \param domain Identifier string
+ * \param level Logging level flags
+ * \param format \c printf format string
+ * \param vargs Variable argument list
+ * Write data to the log file.
  */
 void
-mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *format, va_list args)
+mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *message)
 {
-       vsyslog(mapSyslogLevel(level), format, args);
+       syslog (mapSyslogLevel(level), "%s", message);
 
-       if (level == G_LOG_FLAG_FATAL)
+       if (level & G_LOG_LEVEL_ERROR)
                abort();
 }
 
 /**
- * mono_log_close_logfile
- *
- *     Close the log file
+ * mono_log_close_syslog:
+ * Close the log file
  */
 void
 mono_log_close_syslog()