I have an initialized receiver that writes to a file:
logging::add_file_log
(
keywords::file_name = "sample_%N.log",
keywords::rotation_size = 10 * 1024 * 1024,
keywords::time_based_rotation = sinks::file::rotation_at_time_point(0, 0, 0),
keywords::format = "[%TimeStamp%]: %Message%",
keywords::auto_flush = true
);
It looks like it overwrites the file while the program restarts. How to make it attached to a file?
source
share