logsys_config_subsys_set() always changes the priority of subsystem logging. Despite there being a check below the assignment to make sure the new priority is higher than the old.

This patch fixes the anomoly but it open up a few other questions.

We need _logsys_subsys_create() to work like this (patched) because otherwise the defaults in constructor macros in loaded lcrso modules will overwrite options set in the config file. Making debug options in the config file useless.

However, it will be useful to downgrade logging on-the-fly in a production environment if a customer has been asked to enable debugging and now wants to switch it off without a node restart.


--

Chrissie
Index: trunk/exec/logsys.c
===================================================================
--- trunk/exec/logsys.c	(revision 1572)
+++ trunk/exec/logsys.c	(working copy)
@@ -181,7 +181,6 @@
  	for (i = 0; i < MAX_LOGGERS; i++) {
 		if (strcmp (logsys_loggers[i].subsys, subsys) == 0) {
 			logsys_loggers[i].tags = tags;
-			logsys_loggers[i].priority = priority;
 
 			if (priority > logsys_loggers[i].priority) {
 				logsys_loggers[i].priority = priority;
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to