Function template add_file_log
boost::log::add_file_log
 
Synopsis
template<typename... ArgsT> 
  shared_ptr< sinks::synchronous_sink< sinks::text_file_backend > > 
  add_file_log(ArgsT... const & args);
Description
The function initializes the logging library to write logs to a file stream.
| Parameters: | 
| args
 | A number of named arguments. The following parameters are supported:  
file_nameThe active file name or its pattern. This parameter is mandatory.
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 thefile_nameparameter. By default, no renaming is done, i.e. the written log file keeps its name according tofile_name.
open_modeThe mask that describes the open mode for the file. Seestd::ios_base::openmode.
rotation_sizeThe size of the file at which rotation should occur. Seebasic_text_file_backend.
time_based_rotationThe predicate for time-based file rotations. Seebasic_text_file_backend.
auto_flushA boolean flag that shows whether the sink should automatically flush the file after each written record.
auto_newline_mode- Specifies automatic trailing newline insertion mode. Must be a value of theauto_newline_modeenum. By default, isauto_newline_mode::insert_if_missing.
targetThe target directory to store rotated files in. Seesinks::file::make_collector.
max_sizeThe maximum total size of rotated files in the target directory. Seesinks::file::make_collector.
min_free_spaceMinimum free space in the target directory. Seesinks::file::make_collector.
max_filesThe maximum total number of rotated files in the target directory. Seesinks::file::make_collector.
scan_methodThe method of scanning the target directory for log files. Seesinks::file::scan_method.
filterSpecifies a filter to install into the sink. May be a string that represents a filter, or a filter lambda expression.
formatSpecifies a formatter to install into the sink. May be a string that represents a formatter, or a formatter lambda expression (either streaming or Boost.Format-like notation).
 |  | 
| Returns: | Pointer to the constructed sink.  |