is there a possibility, to write with Boost Log the history log files in another folder than the current log file?
- log
- trace_2.log
- history
- trace_0.log
- trace_1.log
I'm using an asynchronous sink and tried it via set_file_collector
, but all logs are written to /tmp/log
folder and when after closing the application, the file is moved to /tmp/log/history
:
sink->locked_backend()->set_file_name_pattern("/tmp/log/trace_%3N.log");
sink->locked_backend()->set_file_collector(boost::log::sinks::file::make_collector(
boost::log::keywords::target = "/tmp/log/history/"
));
When I try this without set_file_collector
, the files are written to /tmp/log
.
Thank you in advance!