Boost logo

Boost :

From: Darryl Green (darryl.green_at_[hidden])
Date: 2005-05-21 07:36:05


John Torjo <john.lists <at> torjo.com> writes:
>
> Hi Darryl,
>
> Sorry for the late reply...

No worries.

>
> I really like the sink concept. I could do something like:
>
> get_sink("app.*").set_level(LEVEL_DEBUG);
> get_sink("app.*").add_appender(some_appender);
> get_sink("app.*").del_appender(some_appender);

Something like that, yes. Though I would spell it
log_mgr.add_appender("app.*", some_appender)
or (if a singleton log_mgr)
get_log_mgr().add_appender("app.*", some_appender)

>
> The easiest way to implement deletion of appenders/modifiers, is to
> allow naming them. Once an appender has a name, when you say:
>
> get_sink("app.*").del_appender( "my_cool_appender");
>
> it will remove it. This will remove all appenders with that name.
> I think this would be quite an easy to use solution.
>
> What do you think?

Yes, names are fine - I'd certainly use that approach in the default
manager. I still think the actual sink should be oblivious to this,
as I said:

>> However, to be able to do that appenders (or connections to them)
>> need to be comparable. It should be possible to write a manager to
>> do this (eg one that indexes appenders by name), but the logger
>> interface won't let me.

c u
Darryl.


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