0

I am using a configuration file to read the sink log settings.

My requirement is to add a configuration setting to append contents to existing log file when the process gets restarted as mentioned here using "open_mode = std::ios_base::app"

Boost Log clears log file

However, i do not see this particular setting in Table 1.13. "TextFile" sink settings

http://www.boost.org/doc/libs/1_57_0/libs/log/doc/html/log/detailed/utilities.html#log.detailed.utilities.setup.filter_formatter

How do i configure the log file open mode settings via the configuration file

Karthik K N
  • 71
  • 3
  • 7

1 Answers1

0

You can add the "Append" parameter for the "TextFile" sink. The parameter can have value of "true" or "false" (the default) and enables appending to an existing file instead of overwriting it.

The parameter is not documented by mistake, but the parameter is supported by Boost.Log implementation.

Andrey Semashev
  • 10,046
  • 1
  • 17
  • 27