|
||||
File indexing completed on 2025-01-18 09:39:25
0001 /* 0002 * Copyright Andrey Semashev 2007 - 2015. 0003 * Distributed under the Boost Software License, Version 1.0. 0004 * (See accompanying file LICENSE_1_0.txt or copy at 0005 * http://www.boost.org/LICENSE_1_0.txt) 0006 */ 0007 /*! 0008 * \file text_file_backend.hpp 0009 * \author Andrey Semashev 0010 * \date 09.06.2009 0011 * 0012 * The header contains implementation of a text file sink backend. 0013 */ 0014 0015 #ifndef BOOST_LOG_SINKS_TEXT_FILE_BACKEND_HPP_INCLUDED_ 0016 #define BOOST_LOG_SINKS_TEXT_FILE_BACKEND_HPP_INCLUDED_ 0017 0018 #include <ios> 0019 #include <string> 0020 #include <ostream> 0021 #include <boost/limits.hpp> 0022 #include <boost/cstdint.hpp> 0023 #include <boost/optional/optional.hpp> 0024 #include <boost/smart_ptr/shared_ptr.hpp> 0025 #include <boost/date_time/date_defs.hpp> 0026 #include <boost/date_time/special_defs.hpp> 0027 #include <boost/date_time/gregorian/greg_day.hpp> 0028 #include <boost/date_time/posix_time/posix_time_types.hpp> 0029 #include <boost/filesystem/path.hpp> 0030 #include <boost/log/keywords/max_size.hpp> 0031 #include <boost/log/keywords/max_files.hpp> 0032 #include <boost/log/keywords/min_free_space.hpp> 0033 #include <boost/log/keywords/target.hpp> 0034 #include <boost/log/keywords/target_file_name.hpp> 0035 #include <boost/log/keywords/file_name.hpp> 0036 #include <boost/log/keywords/open_mode.hpp> 0037 #include <boost/log/keywords/auto_flush.hpp> 0038 #include <boost/log/keywords/rotation_size.hpp> 0039 #include <boost/log/keywords/time_based_rotation.hpp> 0040 #include <boost/log/keywords/enable_final_rotation.hpp> 0041 #include <boost/log/keywords/auto_newline_mode.hpp> 0042 #include <boost/log/detail/config.hpp> 0043 #include <boost/log/detail/light_function.hpp> 0044 #include <boost/log/detail/parameter_tools.hpp> 0045 #include <boost/log/sinks/auto_newline_mode.hpp> 0046 #include <boost/log/sinks/basic_sink_backend.hpp> 0047 #include <boost/log/sinks/frontend_requirements.hpp> 0048 #include <boost/log/detail/header.hpp> 0049 0050 #ifdef BOOST_HAS_PRAGMA_ONCE 0051 #pragma once 0052 #endif 0053 0054 namespace boost { 0055 0056 BOOST_LOG_OPEN_NAMESPACE 0057 0058 namespace sinks { 0059 0060 namespace file { 0061 0062 //! The enumeration of the stored files scan methods 0063 enum scan_method 0064 { 0065 no_scan, //!< Don't scan for stored files 0066 scan_matching, //!< Scan for files with names matching the specified mask 0067 scan_all //!< Scan for all files in the directory 0068 }; 0069 0070 //! The structure contains filesystem scanning results 0071 struct scan_result 0072 { 0073 //! The number of found files 0074 uintmax_t found_count; 0075 //! If populated, the largest file counter that was used in the found file names 0076 boost::optional< unsigned int > last_file_counter; 0077 0078 scan_result() BOOST_NOEXCEPT : 0079 found_count(0u) 0080 { 0081 } 0082 }; 0083 0084 /*! 0085 * \brief Base class for file collectors 0086 * 0087 * All file collectors, supported by file sink backends, should inherit this class. 0088 */ 0089 struct BOOST_LOG_NO_VTABLE collector 0090 { 0091 /*! 0092 * Default constructor 0093 */ 0094 BOOST_DEFAULTED_FUNCTION(collector(), {}) 0095 0096 /*! 0097 * Virtual destructor 0098 */ 0099 #if !defined(BOOST_LOG_NO_CXX11_DEFAULTED_VIRTUAL_FUNCTIONS) 0100 BOOST_DEFAULTED_FUNCTION(virtual ~collector(), {}) 0101 #else 0102 virtual ~collector() {} 0103 #endif 0104 0105 /*! 0106 * The function stores the specified file in the storage. May lead to an older file 0107 * deletion and a long file moving. 0108 * 0109 * \param src_path The name of the file to be stored 0110 */ 0111 virtual void store_file(filesystem::path const& src_path) = 0; 0112 0113 /*! 0114 * The function checks if the specified path refers to an existing file in the storage. 0115 * 0116 * \param src_path The path to be checked 0117 */ 0118 virtual bool is_in_storage(filesystem::path const& src_path) const = 0; 0119 0120 /*! 0121 * Scans the target directory for the files that have already been stored. The found 0122 * files are added to the collector in order to be tracked and erased, if needed. 0123 * 0124 * The function may scan the directory in two ways: it will either consider every 0125 * file in the directory a log file, or will only consider files with names that 0126 * match the specified pattern. The pattern may contain the following placeholders: 0127 * 0128 * \li %y, %Y, %m, %d - date components, in Boost.DateTime meaning. 0129 * \li %H, %M, %S, %f - time components, in Boost.DateTime meaning. 0130 * \li %N - numeric file counter. May also contain width specification 0131 * in printf-compatible form (e.g. %5N). The resulting number will always be zero-filled. 0132 * \li %% - a percent sign 0133 * 0134 * All other placeholders are not supported. 0135 * 0136 * \param method The method of scanning. If \c no_scan is specified, the call has no effect. 0137 * \param pattern The file name pattern if \a method is \c scan_matching. Otherwise the parameter 0138 * is not used. 0139 * \return The result of filesystem scanning. The last file counter is only populated if 0140 * \a method is \c scan_matching, the \a pattern contains %N placeholder, and at least 0141 * one file matching the pattern is found. 0142 * 0143 * \note In case if \a method is \c scan_matching the effect of this function is highly dependent 0144 * on the \a pattern definition. It is recommended to choose patterns with easily 0145 * distinguished placeholders (i.e. having delimiters between them). Otherwise 0146 * either some files can be mistakenly found or not found, which in turn may lead 0147 * to deletion of an unintended file. 0148 */ 0149 virtual scan_result scan_for_files(scan_method method, filesystem::path const& pattern = filesystem::path()) = 0; 0150 0151 BOOST_DELETED_FUNCTION(collector(collector const&)) 0152 BOOST_DELETED_FUNCTION(collector& operator= (collector const&)) 0153 }; 0154 0155 namespace aux { 0156 0157 //! Creates and returns a file collector with the specified parameters 0158 BOOST_LOG_API shared_ptr< collector > make_collector( 0159 filesystem::path const& target_dir, 0160 uintmax_t max_size, 0161 uintmax_t min_free_space, 0162 uintmax_t max_files = (std::numeric_limits< uintmax_t >::max)() 0163 ); 0164 template< typename ArgsT > 0165 inline shared_ptr< collector > make_collector(ArgsT const& args) 0166 { 0167 return aux::make_collector( 0168 filesystem::path(args[keywords::target]), 0169 args[keywords::max_size | (std::numeric_limits< uintmax_t >::max)()], 0170 args[keywords::min_free_space | static_cast< uintmax_t >(0)], 0171 args[keywords::max_files | (std::numeric_limits< uintmax_t >::max)()]); 0172 } 0173 0174 } // namespace aux 0175 0176 #ifndef BOOST_LOG_DOXYGEN_PASS 0177 0178 template< typename T1 > 0179 inline shared_ptr< collector > make_collector(T1 const& a1) 0180 { 0181 return aux::make_collector(a1); 0182 } 0183 template< typename T1, typename T2 > 0184 inline shared_ptr< collector > make_collector(T1 const& a1, T2 const& a2) 0185 { 0186 return aux::make_collector((a1, a2)); 0187 } 0188 template< typename T1, typename T2, typename T3 > 0189 inline shared_ptr< collector > make_collector(T1 const& a1, T2 const& a2, T3 const& a3) 0190 { 0191 return aux::make_collector((a1, a2, a3)); 0192 } 0193 template< typename T1, typename T2, typename T3, typename T4 > 0194 inline shared_ptr< collector > make_collector(T1 const& a1, T2 const& a2, T3 const& a3, T4 const& a4) 0195 { 0196 return aux::make_collector((a1, a2, a3, a4)); 0197 } 0198 0199 #else 0200 0201 /*! 0202 * The function creates a file collector for the specified target directory. 0203 * Each target directory is managed by a single file collector, so if 0204 * this function is called several times for the same directory, 0205 * it will return a reference to the same file collector. It is safe 0206 * to use the same collector in different sinks, even in a multithreaded 0207 * application. 0208 * 0209 * One can specify certain restrictions for the stored files, such as 0210 * maximum total size or minimum free space left in the target directory. 0211 * If any of the specified restrictions is not met, the oldest stored file 0212 * is deleted. If the same collector is requested more than once with 0213 * different restrictions, the collector will act according to the most strict 0214 * combination of all specified restrictions. 0215 * 0216 * The following named parameters are supported: 0217 * 0218 * \li \c target - Specifies the target directory for the files being stored in. This parameter 0219 * is mandatory. 0220 * \li \c max_size - Specifies the maximum total size, in bytes, of stored files that the collector 0221 * will try not to exceed. If the size exceeds this threshold the oldest file(s) is 0222 * deleted to free space. Note that the threshold may be exceeded if the size of 0223 * individual files exceed the \c max_size value. The threshold is not maintained, 0224 * if not specified. 0225 * \li \c min_free_space - Specifies the minimum free space, in bytes, in the target directory that 0226 * the collector tries to maintain. If the threshold is exceeded, the oldest 0227 * file(s) is deleted to free space. The threshold is not maintained, if not 0228 * specified. 0229 * \li \c max_files - Specifies the maximum number of log files stored. If the number of files exceeds 0230 * this threshold, the oldest file(s) is deleted to free space. The threshhold is 0231 * not maintained if not specified. 0232 * 0233 * \return The file collector. 0234 */ 0235 template< typename... ArgsT > 0236 shared_ptr< collector > make_collector(ArgsT... const& args); 0237 0238 #endif // BOOST_LOG_DOXYGEN_PASS 0239 0240 /*! 0241 * The class represents the time point of log file rotation. One can specify one of three 0242 * types of time point based rotation: 0243 * 0244 * \li rotation takes place every day, at the specified time 0245 * \li rotation takes place on the specified day of every week, at the specified time 0246 * \li rotation takes place on the specified day of every month, at the specified time 0247 * 0248 * The time points are considered to be local time. 0249 */ 0250 class rotation_at_time_point 0251 { 0252 public: 0253 typedef bool result_type; 0254 0255 private: 0256 enum day_kind 0257 { 0258 not_specified, 0259 weekday, 0260 monthday 0261 }; 0262 0263 unsigned char m_Day : 6; 0264 unsigned char m_DayKind : 2; // contains day_kind values 0265 unsigned char m_Hour, m_Minute, m_Second; 0266 0267 mutable posix_time::ptime m_Previous; 0268 0269 public: 0270 /*! 0271 * Creates a rotation time point of every day at the specified time 0272 * 0273 * \param hour The rotation hour, should be within 0 and 23 0274 * \param minute The rotation minute, should be within 0 and 59 0275 * \param second The rotation second, should be within 0 and 59 0276 */ 0277 BOOST_LOG_API explicit rotation_at_time_point(unsigned char hour, unsigned char minute, unsigned char second); 0278 0279 /*! 0280 * Creates a rotation time point of each specified weekday at the specified time 0281 * 0282 * \param wday The weekday of the rotation 0283 * \param hour The rotation hour, should be within 0 and 23 0284 * \param minute The rotation minute, should be within 0 and 59 0285 * \param second The rotation second, should be within 0 and 59 0286 */ 0287 BOOST_LOG_API explicit rotation_at_time_point( 0288 date_time::weekdays wday, 0289 unsigned char hour = 0, 0290 unsigned char minute = 0, 0291 unsigned char second = 0); 0292 0293 /*! 0294 * Creates a rotation time point of each specified day of month at the specified time 0295 * 0296 * \param mday The monthday of the rotation, should be within 1 and 31 0297 * \param hour The rotation hour, should be within 0 and 23 0298 * \param minute The rotation minute, should be within 0 and 59 0299 * \param second The rotation second, should be within 0 and 59 0300 */ 0301 BOOST_LOG_API explicit rotation_at_time_point( 0302 gregorian::greg_day mday, 0303 unsigned char hour = 0, 0304 unsigned char minute = 0, 0305 unsigned char second = 0); 0306 0307 /*! 0308 * Checks if it's time to rotate the file 0309 */ 0310 BOOST_LOG_API bool operator() () const; 0311 }; 0312 0313 /*! 0314 * The class represents the time interval of log file rotation. The log file will be rotated 0315 * after the specified time interval has passed. 0316 */ 0317 class rotation_at_time_interval 0318 { 0319 public: 0320 typedef bool result_type; 0321 0322 private: 0323 posix_time::time_duration m_Interval; 0324 mutable posix_time::ptime m_Previous; 0325 0326 public: 0327 /*! 0328 * Creates a rotation time interval of the specified duration 0329 * 0330 * \param interval The interval of the rotation, should be no less than 1 second 0331 */ 0332 explicit rotation_at_time_interval(posix_time::time_duration const& interval) : 0333 m_Interval(interval) 0334 { 0335 BOOST_ASSERT(!interval.is_special()); 0336 BOOST_ASSERT(interval.total_seconds() > 0); 0337 } 0338 0339 /*! 0340 * Checks if it's time to rotate the file 0341 */ 0342 BOOST_LOG_API bool operator() () const; 0343 }; 0344 0345 } // namespace file 0346 0347 0348 /*! 0349 * \brief An implementation of a text file logging sink backend 0350 * 0351 * The sink backend puts formatted log records to a text file. 0352 * The sink supports file rotation and advanced file control, such as 0353 * size and file count restriction. 0354 */ 0355 class text_file_backend : 0356 public basic_formatted_sink_backend< 0357 char, 0358 combine_requirements< synchronized_feeding, flushing >::type 0359 > 0360 { 0361 //! Base type 0362 typedef basic_formatted_sink_backend< 0363 char, 0364 combine_requirements< synchronized_feeding, flushing >::type 0365 > base_type; 0366 0367 public: 0368 //! Character type 0369 typedef base_type::char_type char_type; 0370 //! String type to be used as a message text holder 0371 typedef base_type::string_type string_type; 0372 //! Stream type 0373 typedef std::basic_ostream< char_type > stream_type; 0374 0375 //! File open handler 0376 typedef boost::log::aux::light_function< void (stream_type&) > open_handler_type; 0377 //! File close handler 0378 typedef boost::log::aux::light_function< void (stream_type&) > close_handler_type; 0379 0380 //! Predicate that defines the time-based condition for file rotation 0381 typedef boost::log::aux::light_function< bool () > time_based_rotation_predicate; 0382 0383 private: 0384 //! \cond 0385 0386 struct implementation; 0387 implementation* m_pImpl; 0388 0389 //! \endcond 0390 0391 public: 0392 /*! 0393 * Default constructor. The constructed sink backend uses default values of all the parameters. 0394 */ 0395 BOOST_LOG_API text_file_backend(); 0396 0397 /*! 0398 * Constructor. Creates a sink backend with the specified named parameters. 0399 * The following named parameters are supported: 0400 * 0401 * \li \c file_name - Specifies the active file name pattern where logs are actually written to. The pattern may 0402 * contain directory and file name portions, but only the file name may contain 0403 * placeholders. The backend supports Boost.DateTime placeholders for injecting 0404 * current time and date into the file name. Also, an additional %N placeholder is 0405 * supported, it will be replaced with an integral increasing file counter. The placeholder 0406 * may also contain width specification in the printf-compatible form (e.g. %5N). The 0407 * printed file counter will always be zero-filled. If \c file_name is not specified, 0408 * pattern "%5N.log" will be used. 0409 * \li \c target_file_name - Specifies the target file name pattern to use to rename the log file on rotation, 0410 * before passing it to the file collector. The pattern may contain the same 0411 * placeholders as the \c file_name parameter. By default, no renaming is done, 0412 * i.e. the written log file keeps its name according to \c file_name. 0413 * \li \c open_mode - File open mode. The mode should be presented in form of mask compatible to 0414 * <tt>std::ios_base::openmode</tt>. If not specified, <tt>trunc | out</tt> will be used. 0415 * \li \c rotation_size - Specifies the approximate size, in characters written, of the temporary file 0416 * upon which the file is passed to the file collector. Note the size does 0417 * not count any possible character conversions that may take place during 0418 * writing to the file. If not specified, the file won't be rotated upon reaching 0419 * any size. 0420 * \li \c time_based_rotation - Specifies the predicate for time-based file rotation. 0421 * No time-based file rotations will be performed, if not specified. 0422 * \li \c enable_final_rotation - Specifies a flag, whether or not perform log file rotation on 0423 * sink backend destruction. By default, is \c true. 0424 * \li \c auto_flush - Specifies a flag, whether or not to automatically flush the file after each 0425 * written log record. By default, is \c false. 0426 * \li \c auto_newline_mode - Specifies automatic trailing newline insertion mode. Must be a value of 0427 * the \c auto_newline_mode enum. By default, is <tt>auto_newline_mode::insert_if_missing</tt>. 0428 * 0429 * \note Read the caution note regarding file name pattern in the <tt>sinks::file::collector::scan_for_files</tt> 0430 * documentation. 0431 */ 0432 #ifndef BOOST_LOG_DOXYGEN_PASS 0433 BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_CALL(text_file_backend, construct) 0434 #else 0435 template< typename... ArgsT > 0436 explicit text_file_backend(ArgsT... const& args); 0437 #endif 0438 0439 /*! 0440 * Destructor 0441 */ 0442 BOOST_LOG_API ~text_file_backend(); 0443 0444 /*! 0445 * The method sets the active file name wildcard for the files being written. The wildcard supports 0446 * date and time injection into the file name. 0447 * 0448 * \param pattern The name pattern for the file being written. 0449 */ 0450 template< typename PathT > 0451 void set_file_name_pattern(PathT const& pattern) 0452 { 0453 set_file_name_pattern_internal(filesystem::path(pattern)); 0454 } 0455 0456 /*! 0457 * The method sets the target file name wildcard for the files being rotated. The wildcard supports 0458 * date and time injection into the file name. 0459 * 0460 * This pattern will be used when the log file is being rotated, to rename the just written 0461 * log file (which has the name according to the pattern in the \c file_name constructor parameter or 0462 * set by a call to \c set_file_name_pattern), just before passing the file to the file collector. 0463 * 0464 * \param pattern The name pattern for the file being rotated. 0465 */ 0466 template< typename PathT > 0467 void set_target_file_name_pattern(PathT const& pattern) 0468 { 0469 set_target_file_name_pattern_internal(filesystem::path(pattern)); 0470 } 0471 0472 /*! 0473 * The method sets the file open mode 0474 * 0475 * \param mode File open mode 0476 */ 0477 BOOST_LOG_API void set_open_mode(std::ios_base::openmode mode); 0478 0479 /*! 0480 * The method sets the log file collector function. The function is called 0481 * on file rotation and is being passed the written file name. 0482 * 0483 * \param collector The file collector function object 0484 */ 0485 BOOST_LOG_API void set_file_collector(shared_ptr< file::collector > const& collector); 0486 0487 /*! 0488 * The method sets file opening handler. The handler will be called every time 0489 * the backend opens a new temporary file. The handler may write a header to the 0490 * opened file in order to maintain file validity. 0491 * 0492 * \param handler The file open handler function object 0493 */ 0494 BOOST_LOG_API void set_open_handler(open_handler_type const& handler); 0495 0496 /*! 0497 * The method sets file closing handler. The handler will be called every time 0498 * the backend closes a temporary file. The handler may write a footer to the 0499 * opened file in order to maintain file validity. 0500 * 0501 * \param handler The file close handler function object 0502 */ 0503 BOOST_LOG_API void set_close_handler(close_handler_type const& handler); 0504 0505 /*! 0506 * The method sets maximum file size. When the size is reached, file rotation is performed. 0507 * 0508 * \note The size does not count any possible character translations that may happen in 0509 * the underlying API. This may result in greater actual sizes of the written files. 0510 * 0511 * \param size The maximum file size, in characters. 0512 */ 0513 BOOST_LOG_API void set_rotation_size(uintmax_t size); 0514 0515 /*! 0516 * The method sets the predicate that defines the time-based condition for file rotation. 0517 * 0518 * \note The rotation always occurs on writing a log record, so the rotation is 0519 * not strictly bound to the specified condition. 0520 * 0521 * \param predicate The predicate that defines the time-based condition for file rotation. 0522 * If empty, no time-based rotation will take place. 0523 */ 0524 BOOST_LOG_API void set_time_based_rotation(time_based_rotation_predicate const& predicate); 0525 0526 /*! 0527 * The method allows to enable or disable log file rotation on sink destruction. 0528 * 0529 * By default the sink backend will rotate the log file, if it's been written to, on 0530 * destruction. 0531 * 0532 * \param enable The flag indicates whether the final rotation should be performed. 0533 */ 0534 BOOST_LOG_API void enable_final_rotation(bool enable); 0535 0536 /*! 0537 * Sets the flag to automatically flush write buffers of the file being written after each log record. 0538 * 0539 * \param enable The flag indicates whether the automatic buffer flush should be performed. 0540 */ 0541 BOOST_LOG_API void auto_flush(bool enable = true); 0542 0543 /*! 0544 * Selects whether a trailing newline should be automatically inserted after every log record. See 0545 * \c auto_newline_mode description for the possible modes of operation. 0546 * 0547 * \param mode The trailing newline insertion mode. 0548 */ 0549 BOOST_LOG_API void set_auto_newline_mode(auto_newline_mode mode); 0550 0551 /*! 0552 * \return The name of the currently open log file. If no file is open, returns an empty path. 0553 */ 0554 BOOST_LOG_API filesystem::path get_current_file_name() const; 0555 0556 /*! 0557 * Performs scanning of the target directory for log files that may have been left from 0558 * previous runs of the application. The found files are considered by the file collector 0559 * as if they were rotated. 0560 * 0561 * The file scan can be performed in two ways: either all files in the target directory will 0562 * be considered as log files, or only those files that satisfy the target file name pattern. 0563 * See documentation on <tt>sinks::file::collector::scan_for_files</tt> for more information. 0564 * 0565 * \pre File collector and the proper file name pattern have already been set. 0566 * 0567 * \param method File scanning method 0568 * \param update_counter If \c true and \a method is \c scan_matching, the method attempts 0569 * to update the internal file counter according to the found files. The counter 0570 * is unaffected otherwise. 0571 * \return The number of files found. 0572 * 0573 * \note The method essentially delegates to the same-named function of the file collector. 0574 */ 0575 BOOST_LOG_API uintmax_t scan_for_files( 0576 file::scan_method method = file::scan_matching, bool update_counter = true); 0577 0578 /*! 0579 * The method writes the message to the sink 0580 */ 0581 BOOST_LOG_API void consume(record_view const& rec, string_type const& formatted_message); 0582 0583 /*! 0584 * The method flushes the currently open log file 0585 */ 0586 BOOST_LOG_API void flush(); 0587 0588 /*! 0589 * The method rotates the file 0590 */ 0591 BOOST_LOG_API void rotate_file(); 0592 0593 private: 0594 #ifndef BOOST_LOG_DOXYGEN_PASS 0595 //! Constructor implementation 0596 template< typename ArgsT > 0597 void construct(ArgsT const& args) 0598 { 0599 construct( 0600 filesystem::path(args[keywords::file_name | filesystem::path()]), 0601 filesystem::path(args[keywords::target_file_name | filesystem::path()]), 0602 args[keywords::open_mode | (std::ios_base::trunc | std::ios_base::out)], 0603 args[keywords::rotation_size | (std::numeric_limits< uintmax_t >::max)()], 0604 args[keywords::time_based_rotation | time_based_rotation_predicate()], 0605 args[keywords::auto_newline_mode | insert_if_missing], 0606 args[keywords::auto_flush | false], 0607 args[keywords::enable_final_rotation | true]); 0608 } 0609 //! Constructor implementation 0610 BOOST_LOG_API void construct( 0611 filesystem::path const& pattern, 0612 filesystem::path const& target_file_name, 0613 std::ios_base::openmode mode, 0614 uintmax_t rotation_size, 0615 time_based_rotation_predicate const& time_based_rotation, 0616 auto_newline_mode auto_newline, 0617 bool auto_flush, 0618 bool enable_final_rotation); 0619 0620 //! The method sets file name pattern 0621 BOOST_LOG_API void set_file_name_pattern_internal(filesystem::path const& pattern); 0622 //! The method sets target file name pattern 0623 BOOST_LOG_API void set_target_file_name_pattern_internal(filesystem::path const& pattern); 0624 0625 //! Closes the currently open file 0626 void close_file(); 0627 #endif // BOOST_LOG_DOXYGEN_PASS 0628 }; 0629 0630 } // namespace sinks 0631 0632 BOOST_LOG_CLOSE_NAMESPACE // namespace log 0633 0634 } // namespace boost 0635 0636 #include <boost/log/detail/footer.hpp> 0637 0638 #endif // BOOST_LOG_SINKS_TEXT_FILE_BACKEND_HPP_INCLUDED_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |