Modified: freeswitch/trunk/conf/autoload_configs/syslog.conf.xml (15161 => 15162)
--- freeswitch/trunk/conf/autoload_configs/syslog.conf.xml 2009-10-14 21:42:33 UTC (rev 15161)
+++ freeswitch/trunk/conf/autoload_configs/syslog.conf.xml 2009-10-15 03:49:26 UTC (rev 15162)
@@ -9,6 +9,7 @@
<!-- info - informational message -->
<!-- debug - debug-level message -->
<settings>
+ <param name="facility" value="user"/>
<param name="ident" value="freeswitch"/>
<param name="loglevel" value="warning"/>
</settings>
Modified: freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c (15161 => 15162)
--- freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c 2009-10-14 21:42:33 UTC (rev 15161)
+++ freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c 2009-10-15 03:49:26 UTC (rev 15162)
@@ -49,10 +49,12 @@
static struct {
char *ident;
char *format;
+ char *facility;
} globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ident, globals.ident);
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_format, globals.format);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility);
static switch_loadable_module_interface_t console_module_interface = {
/*.module_name */ modname,
@@ -126,6 +128,8 @@
set_global_ident(val);
} else if (!strcmp(var, "format")) {
set_global_format(val);
+ } else if (!strcmp(var, "facility")) {
+ set_global_facility(val);
} else if (!strcasecmp(var, "loglevel") && !switch_strlen_zero(val)) {
log_level = switch_log_str2level(val);
if (log_level == SWITCH_LOG_INVALID) {
@@ -144,7 +148,9 @@
if (switch_strlen_zero(globals.format)) {
set_global_format(DEFAULT_FORMAT);
}
-
+ if (switch_strlen_zero(globals.facility)) {
+ set_global_facility(DEFAULT_FACILITY);
+ }
return 0;
}
@@ -173,6 +179,7 @@
switch_safe_free(globals.ident);
switch_safe_free(globals.format);
+ switch_safe_free(globals.facility);
switch_log_unbind_logger(mod_syslog_logger);