[Openais] [PATCH] trunk: logsys should accept my priority

Fabio M. Di Nitto fabbione at fabbione.net
Fri Jul 11 00:48:24 PDT 2008


On Fri, 11 Jul 2008, Christine Caulfield wrote:

> Fabio M. Di Nitto wrote:
>> 
>> Hi Steven,
>> 
>> as discussed in a previous thread logsys_config_subsys_set does not allow 
>> to set a lower priority (for example switching from LOG_LEVEL_DEBUG to 
>> LOG_LEVEL_INFO).
>> 
>> This behaviour can be problematic if we ask people to switch debugging on 
>> and then they can't turn it off.
>> 
>> The patch in attachment allows logsys to roll back to whatever priority the 
>> user wants.
>> 
>> Please apply
>> 
>> 
> The problem with that patch is that it's the opposite of the one I posted and 
> breaks (or rather leaves broken) the initialisation code.

Ok, then we need to fix the initialization code.

> If a logging priority is set in the configuration file, then that is set into 
> logsys during config processing. When the lcrso modules are subsequently 
> loaded they will reset the logging level back to their hard-coded default. So 
> the config options are useless.

Gotcha. I think we can solve it easily by checking if it was previously 
configured before setting the default in the init code.

Fabio

--
I'm going to make him an offer he can't refuse.


More information about the Openais mailing list