The wrap_filter helper can be used to inject user-defined filter
functions into Boost.Log filtering expressions.
Added implementation, tests, docs and examples.
Refs https://github.com/boostorg/log/issues/195.
This replaces boost::thread and most mutexes and condition variables with
std equivalents. It also adds support for std lock types to the strictest_lock
type trait.
This significantly, although not completely, reduces the dependency on
Boost.Thread.
Refs https://github.com/boostorg/log/issues/232.
The manipulator allows to inject user's function into a stream output
expression. The manipulator will pass a reference to the stream to
the user's function as the first parameter, optionally followed by
additional arguments passed to the manipulator construction.
This is needed because Boost.Regex includes windows.h internally,
which causes it to define a different target Windows version than
that is used by Boost.Log, which results in linking errors.
https://github.com/boostorg/regex/issues/154
Although attributes are normally only shallow-copied, it is useful to allow
the channel attribute to be deep copied when the parent logger is copied. This
would eliminate the unexpected effect of modifying the channel in the copy, as
it would otherwise affect the original logger. This commit makes copy
constructor and assignment of the channel loggers deep-copy the channel value.
The problem was reported in:
https://stackoverflow.com/questions/66120806/deep-copy-of-boost-logger.
Note that any other attributes that might have been added to the logger are
still shallow copied.
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.
When a user defines an output operator for std::basic_ostream and
a pointer to a user-defined type, that operator use to be ignored
because of the implicit cast to const void* that happened when
operator<< for formatting_ostream or record_ostream was called.
We now forward the pointer type to the operator<< for std::ostream,
so it is either cast then or user's operator<< is picked.
Fixes https://github.com/boostorg/log/issues/84.
Explicit output operators allow to enable character code conversion, if
one is needed, on string view output. This is in line with the existing
support for other string types.
The implementation in Boost.Core was based in unhandled_exception_count
in Boost.Log, therefore we remove our loca implementation in favor
of the common one.
included into the size limit.
The max_size method on the stream buffer will now attempt to truncate
the attached string on the character boundary.
Fixed character boundary detection for multibyte encodings.
Clean up the overflow flag and the max size limit after the formatter
has completed.
Added a test for the max_size decorator.
Cleaned up some includes and reduced the dependency on Boost.Thread.