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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Thanks for pointing this out. I think I fixed this in trunk.
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!
The fix will be released in Boost 1.55 and is available in the recently published 1.55 beta1.
Thanks a lot for the fast answer so I will wait for 1.55 to own this feature :-)!
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
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.
A misunderstanding! Therefore removed!
Last edit: Ivan Suricz 2013-10-10
You can checkout Boost trunk as described here. The changeset I made is 86225.