Boost logo

Boost :

Subject: Re: [boost] loglite - A logging library
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-10-29 12:36:19


On Thu, Oct 29, 2009 at 6:19 AM, JD <jean.daniel.michaud_at_[hidden]> wrote:
> On Oct 28, 9:51 pm, Emil Dotchevski <emildotchev..._at_[hidden]> wrote:
>> On Wed, Oct 28, 2009 at 12:14 PM, JD <jean.daniel.mich..._at_[hidden]> wrote:
>> >> >  It's been a while since a discussion about logging hasn't ran on the
>> >> > boost mailing list.
>> >> >  I have a small logging library implementing some of the requirements
>> >> > that were previously deemed desirable during the discussion we had here
>> >> > a couple of years ago.
>>
>> What is the rationale for attaching semantics to messages (log,
>> warning, error, etc.)? I'm assuming the logging library isn't going to
>> take action -- such as terminate the program in case of a fatal error
>> -- so why not just define severity level?
>>
>
> I'm using semantics to satisfy the 2 requirements below :
> 7. Configurable log message attributes
> 9. Filtering support

Unless there is a use case for non-exclusive semantics (like needing
to classify a logged message as both error and warning), I think it
would be simpler to use different targets for messages depending on
whether they are a warning or an error:

WARN << "A warning";
ERR << "An error";

(sort of like std::cout vs. std::cerr)

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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