Boost logo

Boost :

Subject: Re: [boost] [log] How to set/reset a channel-specific filter
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2010-03-16 16:08:14


>> More precisely, we want to provide a utility function where you pass in
>> a logger and a severity and the function then modifies the global filter
>> so that all records comming from the specified logger with a severity
>> below the specified one will be discarded.
>
> But if you can pass a logger to this function, why can't you pass the
> channel name?

I guess I can, see below.

>> Unless I'm missing something,
>> this would require us keeping a global list of all loggers that have a
>> filter applied, correct?
>
> Unless you can work with channel names instead of loggers, yes.

I don't understand, it seems even if I have the channel name (instead of the
logger), I still need to maintain a global map that associates each channel
name with its minimum severity level, right? Otherwise I don't see how I can
implement is_channel_enabled.

Anyway, doing this certainly is no big deal. It just seems a bit odd,
because it would be easier and more efficient to implement if we could set a
filter on a logger.

Thanks & Regards,

Andreas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk