Hi Steven,

this patch basically allows each subsystem to set its own logging level as configure option to override built time values.

Extra bonus it fixes the default setting for the priority to LOG_LEVEL_INFO.

Please apply
Fabio

--
I'm going to make him an offer he can't refuse.
Index: exec/mainconfig.c
===================================================================
--- exec/mainconfig.c   (revision 1555)
+++ exec/mainconfig.c   (working copy)
@@ -208,7 +208,7 @@
                                        logsys_logger.priority = 
LOG_LEVEL_DEBUG;
                                } else
                                if (strcmp (value, "off") == 0) {
-                                       logsys_logger.priority &= 
~LOG_LEVEL_DEBUG;
+                                       logsys_logger.priority = LOG_LEVEL_INFO;
                                } else {
                                        goto parse_error;
                                }
@@ -217,7 +217,13 @@
                                if (global_debug)
                                        logsys_logger.priority = 
LOG_LEVEL_DEBUG;
                        }
-
+                       if (logsys_logger.priority != LOG_LEVEL_DEBUG) {
+                               if (!objdb_get_string (objdb, 
object_logger_subsys_handle, "syslog_level", &value)) {
+                                       logsys_logger.priority = 
logsys_priority_id_get(value);
+                                       if (logsys_logger.priority < 0)
+                                               logsys_logger.priority = 
LOG_LEVEL_INFO;
+                               }
+                       }
                        if (!objdb_get_string (objdb, 
object_logger_subsys_handle, "tags", &value)) {
                                char *token = strtok (value, "|");
 
Index: man/openais.conf.5
===================================================================
--- man/openais.conf.5  (revision 1555)
+++ man/openais.conf.5  (working copy)
@@ -495,6 +495,13 @@
 The default is off.
 
 .TP
+syslog_level
+This specifies the syslog level for this particular subsystem. Ignored if 
debug is on.
+Possible values are: alert, crit, debug (same as debug = on), emerg, err, 
info, notice, warning.
+
+The default is: info.
+
+.TP
 tags
 This specifies which tags should be traced for this particular logger.
 Set debug directive to
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to