updated boost on windows
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <boost/log/keywords/max_files.hpp>
|
||||
#include <boost/log/keywords/min_free_space.hpp>
|
||||
#include <boost/log/keywords/target.hpp>
|
||||
#include <boost/log/keywords/target_file_name.hpp>
|
||||
#include <boost/log/keywords/file_name.hpp>
|
||||
#include <boost/log/keywords/open_mode.hpp>
|
||||
#include <boost/log/keywords/auto_flush.hpp>
|
||||
@@ -371,7 +372,7 @@ public:
|
||||
* Constructor. Creates a sink backend with the specified named parameters.
|
||||
* The following named parameters are supported:
|
||||
*
|
||||
* \li \c file_name - Specifies the file name pattern where logs are actually written to. The pattern may
|
||||
* \li \c file_name - Specifies the active file name pattern where logs are actually written to. The pattern may
|
||||
* contain directory and file name portions, but only the file name may contain
|
||||
* placeholders. The backend supports Boost.DateTime placeholders for injecting
|
||||
* current time and date into the file name. Also, an additional %N placeholder is
|
||||
@@ -379,6 +380,10 @@ public:
|
||||
* may also contain width specification in the printf-compatible form (e.g. %5N). The
|
||||
* printed file counter will always be zero-filled. If \c file_name is not specified,
|
||||
* pattern "%5N.log" will be used.
|
||||
* \li \c target_file_name - Specifies the target file name pattern to use to rename the log file on rotation,
|
||||
* before passing it to the file collector. The pattern may contain the same
|
||||
* placeholders as the \c file_name parameter. By default, no renaming is done,
|
||||
* i.e. the written log file keeps its name according to \c file_name.
|
||||
* \li \c open_mode - File open mode. The mode should be presented in form of mask compatible to
|
||||
* <tt>std::ios_base::openmode</tt>. If not specified, <tt>trunc | out</tt> will be used.
|
||||
* \li \c rotation_size - Specifies the approximate size, in characters written, of the temporary file
|
||||
@@ -409,7 +414,7 @@ public:
|
||||
BOOST_LOG_API ~text_file_backend();
|
||||
|
||||
/*!
|
||||
* The method sets file name wildcard for the files being written. The wildcard supports
|
||||
* The method sets the active file name wildcard for the files being written. The wildcard supports
|
||||
* date and time injection into the file name.
|
||||
*
|
||||
* \param pattern The name pattern for the file being written.
|
||||
@@ -420,6 +425,22 @@ public:
|
||||
set_file_name_pattern_internal(filesystem::path(pattern));
|
||||
}
|
||||
|
||||
/*!
|
||||
* The method sets the target file name wildcard for the files being rotated. The wildcard supports
|
||||
* date and time injection into the file name.
|
||||
*
|
||||
* This pattern will be used when the log file is being rotated, to rename the just written
|
||||
* log file (which has the name according to the pattern in the \c file_name constructor parameter or
|
||||
* set by a call to \c set_file_name_pattern), just before passing the file to the file collector.
|
||||
*
|
||||
* \param pattern The name pattern for the file being rotated.
|
||||
*/
|
||||
template< typename PathT >
|
||||
void set_target_file_name_pattern(PathT const& pattern)
|
||||
{
|
||||
set_target_file_name_pattern_internal(filesystem::path(pattern));
|
||||
}
|
||||
|
||||
/*!
|
||||
* The method sets the file open mode
|
||||
*
|
||||
@@ -502,7 +523,7 @@ public:
|
||||
* as if they were rotated.
|
||||
*
|
||||
* The file scan can be performed in two ways: either all files in the target directory will
|
||||
* be considered as log files, or only those files that satisfy the file name pattern.
|
||||
* be considered as log files, or only those files that satisfy the target file name pattern.
|
||||
* See documentation on <tt>sinks::file::collector::scan_for_files</tt> for more information.
|
||||
*
|
||||
* \pre File collector and the proper file name pattern have already been set.
|
||||
@@ -541,6 +562,7 @@ private:
|
||||
{
|
||||
construct(
|
||||
filesystem::path(args[keywords::file_name | filesystem::path()]),
|
||||
filesystem::path(args[keywords::target_file_name | filesystem::path()]),
|
||||
args[keywords::open_mode | (std::ios_base::trunc | std::ios_base::out)],
|
||||
args[keywords::rotation_size | (std::numeric_limits< uintmax_t >::max)()],
|
||||
args[keywords::time_based_rotation | time_based_rotation_predicate()],
|
||||
@@ -550,14 +572,17 @@ private:
|
||||
//! Constructor implementation
|
||||
BOOST_LOG_API void construct(
|
||||
filesystem::path const& pattern,
|
||||
filesystem::path const& target_file_name,
|
||||
std::ios_base::openmode mode,
|
||||
uintmax_t rotation_size,
|
||||
time_based_rotation_predicate const& time_based_rotation,
|
||||
bool auto_flush,
|
||||
bool enable_final_rotation);
|
||||
|
||||
//! The method sets file name mask
|
||||
//! The method sets file name pattern
|
||||
BOOST_LOG_API void set_file_name_pattern_internal(filesystem::path const& pattern);
|
||||
//! The method sets target file name pattern
|
||||
BOOST_LOG_API void set_target_file_name_pattern_internal(filesystem::path const& pattern);
|
||||
|
||||
//! Closes the currently open file
|
||||
void close_file();
|
||||
|
||||
Reference in New Issue
Block a user