The new example demostrates working with the settings container directly
and provides a more complete view on the library initialization.
Closes https://github.com/boostorg/log/issues/87.
The manipulator and formatter can be used to ensure a certain piece of output
ends with a newline without introducing duplicate newline characters if the
previous output ended with a newline already.
Text ostream, file and multifile sink backends now support controlling trailing
newline insertion after every log records. The supported modes are described by
the auto_newline_mode enum. The behavior can be controlled via the same-named
named parameter, a set_auto_newline_mode call or the AutoNewline parameter
in the settings.
The default behavior has changed from the previous releases. From now on the
trailing newline will only be added if there isn't one in the formatted log
message already.
This allows to have different file names when actively writing the log file
and when rotating. In particular, this solves the problem with appending
to the previous file, when the log files are also collected and are supposed
to have distincs names.
This can be useful when the final rotation cannot be performed while global destructors are run (e.g. when a close handler depends on a global state).
It can also be useful to implement file appending with collector set up to a different target directory than the directory the backend writes to.