Subject: [Boost-bugs] [Boost C++ Libraries] #12369: In boost::log, how to print extra header line when file rotation/rollover
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-08-02 15:39:59
#12369: In boost::log, how to print extra header line when file rotation/rollover
------------------------------+---------------------
Reporter: xinyan.zhang@⦠| Owner: andysem
Type: Support Requests | Status: new
Milestone: To Be Determined | Component: log
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
I have an extra header line to be written to log file (csv format). It has
a special format. How to write this header line every time when log file
is rotated/rollover? Thank you.
My code is like:
const char *logHeaders = "timestamp,thread,client,message";
...
boost::shared_ptr< sinks::text_file_backend > backend =
boost::make_shared< sinks::text_file_backend >(
logging::keywords::file_name = "myfile_%5N.csv"
logging::keywords::rotation_size = 5 * 1024 * 1024,
logging::keywords::time_based_rotation =
sinks::file::rotation_at_time_point(12, 0, 0),
);
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12369> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC