|
Boost : |
Subject: Re: [boost] [log] Default logging configuration for trivial logger
From: Ben Pope (benpope81_at_[hidden])
Date: 2014-02-20 23:38:52
On Tuesday, February 18, 2014 07:28 PM, Andrey Semashev wrote:
> On Tue, Feb 18, 2014 at 1:25 PM, Ben Pope <benpope81_at_[hidden]> wrote:
>> On 18/02/14 16:49, Andrey Semashev wrote:
>>>
>>> On Tue, Feb 18, 2014 at 12:28 PM, Ben Pope <benpope81_at_[hidden]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm using the trivial logging interface, but I need to tweak the default
>>>> configuration. I want to be able to flush after every log entry, and I
>>>> also want to be able to do file rolling.
>>>>
>>>> As far as I can tell, in order to configure it this way, I pretty much
>>>> need to configure the whole thing from scratch including formatters, but
>>>> I can't find the code that sets up the default logger to replicate it.
>>>>
>>>> Any pointers?
>>>
>>>
>>> Yes, you have to create and configure the sink yourself to do that.
>>> The default sink cannot be accessed. It is rather specialized and
>>> cannot be customized in any way, so it wouldn't be of use for you
>>> anyway.
>>
>>
>> The code for the default formatter and sink must exist somewhere for
>> inspiration, no?
>
> It's in libs/log/src/default_sink.cpp.
Thank you, I managed to get my new logs formatted similarly to the old ones.
Ben
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk