I am using boost::log as the logging engine for a service. I know how to set up the log rotation to be daily/weekly, but what I would like to set-up is an hourly rotation of the logs. I am unable to find any straight forward implementation in boost and I am thinking maybe someone has a workaround?
Also, is it possible to have rotated files created, even if there was no log entry for a specific hour?
use case:
log_file.log
13.06.2016 12:02 line1
13.06.2016 12:23 line2
13.06.2016 12:45 line3
13.06.2016 13:02 line4
13.06.2016 15:02 line5
I'd like the output files to be:
**log_file_13:06:2016-12**
13.06.2016 12:02 line1
13.06.2016 12:23 line2
13.06.2016 12:45 line3
**log_file_13:06:2016-13**
13.06.2016 13:02 line4
**log_file_13:06:2016-14**
**log_file_13:06:2016-15**
13.06.2016 15:02 line5
Any suggestions/code examples are much appreciated.