Re: [Cppcms-users] booster::log
Brought to you by:
artyom-beilis
|
From: Marcel H. <ke...@co...> - 2012-03-15 15:24:15
|
so if i guess it right:
- a level is not sink specific, it's dependent on the message that
should be logged.
- a sink is the backend of the logger
- every message goes to the logger and then to every sink.
My idea is to implement a sink specifiec logger level, that means you
register a sink
l.add_sink(fsink, debug);
l.add_sink(csink, error);
with the error level.
What does it mean:
The responsibolity of logging is not in the message itself but in
the registered sink.
You don't have to check if the message itself should be logged, but
if a sink is registered that has this loglevel (or above of course)
You also may specific a name, instead of a pointer for a registered
sink, f.e.
fsink.name("fileLogger");
csink.name("ConsoleLogger");
My inspiration is the logger util from java which I really like.
http://docs.oracle.com/javase/1.4.2/docs/api/java/util/logging/Logger.html
The hirachy is optional but I like the concept.
Regards,
Marcel
|