about log level configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-05-16 at 23:01 +0800, rong deng wrote:
> Hi list,
> 
> I'm implementing 'category' feature in pulseaudio, the 'category' feature
> mimics the feature in gstreamer, i.e. we can use something like
> 'ENV_LOG_DEBUG=loopback:5 pulseaudio' to setup the level of module loopback
> to 5.
> 
> During my implementation, I found there's already an environment variable
> called 'ENV_LOG_LEVEL' used, then my question is how to setup the log level
> when both 'ENV_LOG_LEVEL' is set and 'ENV_LOG_DEBUG=*:4' is set? I'm afraid
> we can deprecate the usage of the original 'ENV_LOG_DEBUG' and advocate
> users to use the new one. How's the community's take on this one?
> 
> Any thoughts are welcome.

(The ENV_ prefix is used for environment variable name constants in
PulseAudio code, the actual environment variables have PULSE_ prefix. I
think it's clearer if we use only the real environment variable names in
this discussion.)

More specific environment variables should override more general
variables. For example, if PULSE_LOG is set to "3" and and
PULSE_LOG_DEBUG (or whatever the name will be - I'm not too fond of
PULSE_LOG_DEBUG) is set to "loopback:5", then loopback messages should
be logged at level 5 and everything else at level 3.

It might make sense to eventually remove support PULSE_LOG altogether. I
don't have an opinion on that yet. I think it doesn't matter too much at
this point, because we probably will anyway have to support both
PULSE_LOG and PULSE_LOG_DEBUG at the same time at least for a while.

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux