|
Boost : |
Subject: Re: [boost] [log] Boost.Log formal review closing down
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-03-17 17:31:11
On 03/18/2010 12:21 AM, vicente.botet wrote:
>>>
>>> * 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?
>>
>> See our conversation with Steven on this topic. In short, it needs
>> researching on my side. On the spot I can see the problem with attr
>> returning the attribute value upon being called, if more than one type
>> is specified.
>
> Does this mean that you will take care of the separation between attributes/filters and formatters?
This means, I will try to, but I can't promise that I'll succeed.
>>> How many rotation files are maintained?
>>
>> You can specify maximum total size of the files or minimum free space on
>> the drive.
>>
>>> Can this number be configured?
>>
>> See here:
>>
>> http://boost-log.sourceforge.net/libs/log/doc/html/log/detailed/sink_backends.html#log.detailed.sink_backends.text_file.managing_rotated_files
>
> I dont see how to configure the number of rotation files? Could you show me how?
As I said, you can't give the actual number of files, but you can limit
their size. If you construct the backend like this:
boost::shared_ptr< sinks::text_file_backend > backend(
new sinks::text_file_backend(
keywords::file_name = "file_%5N.log",
keywords::rotation_size = 5 * 1024 * 1024
));
backend->set_file_collector(
sinks::file::make_collector(
keywords::target = "./logs",
keywords::max_size = 100 * 1024 * 1024,
));
You won't have more than 20 files in the ./logs directory.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk