Boost logo

Boost :

Subject: Re: [boost] [log] Review-ready version in the Vault
From: Peter Simons (simons_at_[hidden])
Date: 2009-02-13 12:19:52


Hi Andrey,

> Vicente Botet wrote:
>
>> Reading the code I see a lot of
>>
>> try{ //
>> } catch (...){ // Something has gone wrong.
>> }
>>
>> Does it mean that the application is unable to know when things go
>> wrong?
>
> Yes. Although extremely useful, logging is an auxiliary feature of
> the application, so it must not influence business logic.

this statement is not true for the general case. Logging *may* be an
auxiliary feature, i.e. when thinking about debug output that's of
interest mostly for software developers, but there are applications that
must leave a reliable audit trail, i.e. systems that deal with money and
finances. For those applications, logging is part of the business logic.
The same is true to some extend for applications that run in the
background, like network servers, etc.

> That is, users should not be bothered to wrap every log statement in
> a try/catch block.

However, users that do want to deal with those exceptions themselves
should be able to.

Take care,
Peter


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