I’m using Boost Log to capture all keypresses in my embedded device. I want to be able to store at most 3 files of a certain size and rotate them. That’s working.
My problem is a scenario like this:
The device is inserting data into Log_009.log which is in the base folder. In the log folder are Log_006.log, Log_007.log, and Log_008.log.
The program stops and restarts. This may be due to some keypress that was logged in Log_009.log.
When it restarts, it clears out Log_009.log and starts it over – losing the last logged keypresses
Ideally, I’d like Boost Log to just keep appending to Log_009.log, but my reading online says that this isn’t possible. My second favorite solution would be that Log_009 gets rotated and Log_010.log is started. Anything so I don’t lose
Can you see what I’m missing? If a program exits via a crash, does final rotation occur? Maybe I need something like enable_initial_rotation.
Thanks for the help,
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.