Boost logo

Boost :

From: Spencer Collyer (spencer_at_[hidden])
Date: 2007-04-10 02:31:29

On Fri, 6 Apr 2007 23:49:25 +0400, Andrey Semashev wrote:
> Hello Niko,
> Friday, April 6, 2007, 2:12:41 PM, you wrote:
> >> Well, there's no point to log an empty record. At least message
> >> text should be present in any record, don't you think so?
> >>
> > I don't think so. How about I define an new attribute for my logger
> > which is some object that I want to convert to text and format
> > lazily?
> I don't see how is it different from message text. You just output
> your object to the logger stream and see it in the log.

If I may jump in here, I have worked on a system where we had the
specific requirement Niko has come up with. We had an exception library
which logged all exceptions thrown, along with the stack trace for the
exception. However, the stack trace was only output if the minimum
logging level was set to DEBUG1 or lower. As we had multiple streams of
output, with differing logging levels on them, we couldn't just store
the message text, as we needed to determine whether or not to output
the stack trace on each stream.


<<< Eagles may soar, but weasels don't get sucked into jet engines >>>
7:27am up 41 days 14:09, 20 users, load average: 0.01, 0.02, 0.00
Registered Linux User #232457 | LFS ID 11703

Boost list run by bdawes at, gregod at, cpdaniel at, john at