Boost Users :
From: Mojmir Svoboda (mojmir.svoboda_at_[hidden])
Date: 2008-06-13 03:54:41
* Patrick Loney <Patrick.Loney_at_[hidden]> [2008-06-12 15:48:42 +0100]:
> Nat Goodspeed Wrote:
> > - Allows you to turn on logging at runtime
> > - Allows you to be selective about what logging output is produced
> > - Has trivial runtime cost for a suppressed log message.
> Just to back this up Mojmir, these are pretty much essential for a
> useful logging system really. As a developer I can step through my code
> to find out what's happening. Logging can be useful while developing but
> the only reason I include all the extra code in my apps is to allow my
> company to provide support once the system has gone live. If it didn't
> do that I'd stick to the debugger and if the live system is running
> correctly then you don't want the overhead...
see my response for Nat.
i admit log is a saviour frequently. saved my ass so many times! and
even if it does not pinpoint the problem accurately, it provides at
least probable direction of the problem. and knowing your log means
knowing your system. this always helps.
there are drawbacks although:
- it takes resources. okay that's the price you pay but i do not
want pay more that it deserves.
- serializes multithreaded code
there are sometimes faults that occur only with logging off, because
of the serialization by logging library. theser are very nasty :)
on the other hand it may be solved by removing all shared rsrcs,
perhaps by saving each thread's log to separate sink?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net