CPPSERV


Home Projects Jobs Clientele Contact

cppserv


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

Re: Log class problems



OK. Here is another example, where clear separation is good.

Let's for a second forget manipulators - i.e. suppose we set priority
some other way.

Let's say I have special formatting stream (it edits out anything that looks
like password), and I want to use that stream for logging.

With clear separation all I have to do
CBaseLogBuf* logbuf=<get logger buffer from somewhere>
iluxa::password_eating_stream log(logbuf);

and then just write to log.

As for priorities - since they are part of logging itself, setting them
logically belongs to logbuf (and that's where they are implemented)
so, the manipulators are just a shortcut to make usage easier and
cleaner - so, strictly speaking are not required.

Alexey Parshin wrote:

>I like the current implementation. So far - I didn't see anything in
>your arguments that would impress me. If you don't like that idea -
>fine, don't sponsor it.
>
>  
>

-- 
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com


Authoright © Total Knowledge: 2001-2008