2 * mono-log-darwin.c: Darwin-specific interface to the logger
10 #include "mono-logger-internals.h"
12 to_asl_priority (GLogLevelFlags log_level
)
14 switch (log_level
& G_LOG_LEVEL_MASK
)
16 case G_LOG_LEVEL_ERROR
: return ASL_LEVEL_CRIT
;
17 case G_LOG_LEVEL_CRITICAL
: return ASL_LEVEL_ERR
;
18 case G_LOG_LEVEL_WARNING
: return ASL_LEVEL_WARNING
;
19 case G_LOG_LEVEL_MESSAGE
: return ASL_LEVEL_NOTICE
;
20 case G_LOG_LEVEL_INFO
: return ASL_LEVEL_INFO
;
21 case G_LOG_LEVEL_DEBUG
: return ASL_LEVEL_DEBUG
;
27 mono_log_open_asl (const char *path
, void *userData
)
32 mono_log_write_asl (const char *log_domain
, GLogLevelFlags level
, mono_bool hdr
, const char *message
)
34 asl_log (NULL
, NULL
, to_asl_priority (level
), "%s%s%s\n",
35 log_domain
!= NULL
? log_domain
: "",
36 log_domain
!= NULL
? ": " : "",
39 if (level
& G_LOG_LEVEL_ERROR
)