Re: [Boost-bugs] [Boost C++ Libraries] #12369: In boost::log, how to print extra header line when file rotation/rollover

Subject: Re: [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 21:07:42


#12369: In boost::log, how to print extra header line when file rotation/rollover
-------------------------------+---------------------
  Reporter: xinyan.zhang@… | Owner: andysem
      Type: Support Requests | Status: closed
 Milestone: To Be Determined | Component: log
   Version: Boost 1.61.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+---------------------

Comment (by anonymous):

 Replying to [comment:1 andysem]:
> See open/close handlers.
>
>
 http://www.boost.org/doc/libs/1_61_0/libs/log/doc/html/log/detailed/sink_backends.html#log.detailed.sink_backends.text_file

 Hi,
 The example in that link works fine for narrow char. I am using wide char
 header line. But I can not find the wide char version of
 text_file_backend::stream_type. Which one shall I use? Thank you.

 Your example:
 {{{
 void write_header(sinks::text_file_backend::stream_type& file)
 {
     file << "<?xml version=\"1.0\"?>\n<log>\n";
 }
 ...

 sink->locked_backend()->set_open_handler(&write_header);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12369#comment:2>
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