Boost logo

Boost :

Subject: Re: [boost] [log] Boost.Log formal review closing down
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-03-17 04:26:46


Hi,

I though the review will continue until Sunday.

Here is a a part of my review. I will continue this evening.

> - What is your evaluation of the design?

First say that in general I like the library general architecture. Going into details:

* Trivial log
Trivial log should be logged to std::cerr
Trivial log should contain in the record message only the application part and the severity. If the user want line number, a timestamp, thread identifier the library need to let the user configure this trivial logger.

* Filters, Formatters and attributes:
An attribute is a different think than a filter. Filters contains attributes as part of its expressions.

attr< logging::severity_level >("Severity") should return the attribute value when called.

The following expression

attr< logging::severity_level >("Severity") >= logging::info

should return a filter. Can this make be possible and unanbigous?

Note that I have removed the trivial namespace which didn't add any information in the preceding expressions.

The same applies to formatters
fmt::stream
<< fmt::attr< unsigned int >("LineID")
<< ": <" << fmt::attr< logging::trivial::severity_level >("Severity")
<< "> " << fmt::message()

should be just written

fmt::stream
<< attr< unsigned int >("LineID")
<< ": <" << attr< logging::severity_level >("Severity")
<< "> " << message()

or even the library could provide some functions returning the predefined attrributes:

fmt::stream
<< line_id()
<< ": <" << severity_level()
<< "> " << message()

Specific formats could be written as

fmt::stream
<< (format("%08x") % line_id())<< ": <" << severity_level()<< "> " << message()

* Rotation on files.
Can rotation be based only on time? Can we rotate at 2:00AM every day?
How many rotation files are maintained? Can this number be configured?

Best,
Vicente


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