[Boost-bugs] [Boost C++ Libraries] #12402: knowing the current filename used by a boost.log text_file_backend

Subject: [Boost-bugs] [Boost C++ Libraries] #12402: knowing the current filename used by a boost.log text_file_backend
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-08-19 21:00:50


#12402: knowing the current filename used by a boost.log text_file_backend
---------------------------------------------+---------------------
 Reporter: Philip Miller <philip.miller@…> | Owner: andysem
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: log
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: text_file_backend |
---------------------------------------------+---------------------
 I am trying to use the Boost.Log library and am quite pleased with it so
 far. (I am transitioning from log4cxx.) Before getting into the details,
 let me say why I am asking this question.

 1. I need to populate a status line to tell an administrator the path to
 the current output log file.
 2. On shutdown (and at any point really), I need to provide a summary that
 points a user to the path of the last output log file.

 As far as I can tell I am unable to meet either of these requirements with
 the 1.60 implementation of the Boost.Log ``text_file_backend``. Regarding
 the first requirement the ``text_file_backend`` provides open and close
 handler methods, but those use a stream argument and they are intended to
 be used to write header and footer text to the output stream when a file
 is opened or closed. But I need to know the *filename* of the stream that
 is opened.

 Regarding 2, the file_collector ``store_file`` method takes a source path.
 But I need to know the destination path not the source path. I do not see
 anything that exposes the final destination where the collector has stored
 my files.

 As a user of Boost.Log 1.60 is there a way to meet either of these
 requirements through the current API? If not, any suggestions on the best
 way to proceed?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12402>
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