Menu

RotationTimePoint problem

jezstjez
2010-12-30
2013-10-11
  • jezstjez

    jezstjez - 2010-12-30

    I found in my travels a problem resolving the following line in a settings file
    RotationTimePoint="00:00:00"
    When running init_from_stream it returns: "Invalid day of the month 1…31"
    I traced it back to the function any_cast_to_rotation_time_point at init_from_settings.cpp:259
    The problem is to do with attempting to parse the timestamp as a timestamp with a day of the month.

    I didn't pursure this bug past this point because i don't need anything but the daily rollover. So I removed the day of the month and day of the week code from the function and it works for me.

     
  • Andrey Semashev

    Andrey Semashev - 2011-01-06

    Thanks for pointing this out. I think I fixed this in trunk.

     
  • Ivan Suricz

    Ivan Suricz - 2013-10-08

    Hello,

    I am not sure about progress concerning RotationTimePoint, but I currently include boost.log into my application using a settings file and recognized that RotationTimePoint is not working! Using RotationTimePoint="00:00:00" leads to a program crash and taking for example "01:00:00" does not work as assumed! Why doesn't this parameter work properly with my configuration and how can I fix this? I present here a part of my settings file:

    [Core]
    DisableLogging=false
    Filter="%Severity% >= TRACE"

    Sink settings sections

    [Sinks.Rolling]
    Destination=TextFile
    FileName="./log/moduleName_%Y%m%d_%H%M%S.%N.log"
    Target="./log/"
    RotationSize=1048576
    RotationTimePoint="00:00:00"
    Filter="%Severity% >= TRACE"
    Format="%RecordID%: %TimeStamp% %Severity% %ThreadID% | %Scope% | %Message%"
    Asynchronous=false
    AutoFlush=true
    ...

    Would be great if someone can help me with this issue because I need this midnight rotation! Thanks for any help in advance!

     
  • Andrey Semashev

    Andrey Semashev - 2013-10-08

    The fix will be released in Boost 1.55 and is available in the recently published 1.55 beta1.

     
  • Ivan Suricz

    Ivan Suricz - 2013-10-08

    Thanks a lot for the fast answer so I will wait for 1.55 to own this feature :-)!

     
  • Ivan Suricz

    Ivan Suricz - 2013-10-09

    Hi! I tried again with boost 1.55 Beta1 (fresh download, compile and linking) and the problem with RotationTimePoint="00:00:00" is still the same! Is it possible that it has not yet been fixed?
    Regards

     
  • Andrey Semashev

    Andrey Semashev - 2013-10-10

    Yes, the problem was still present somehow, although I thought I've fixed it. I've committed another fix in trunk, which works for me now.

     
  • Ivan Suricz

    Ivan Suricz - 2013-10-10

    A misunderstanding! Therefore removed!

     

    Last edit: Ivan Suricz 2013-10-10
  • Andrey Semashev

    Andrey Semashev - 2013-10-11

    You can checkout Boost trunk as described here. The changeset I made is 86225.

     

Log in to post a comment.