Boost.Mp11 no longer supports C++17 mode with clang-5.0 and causes
compile errors in Boost.MultiIndex and Boost.PropertyTree.
Refs https://github.com/boostorg/mp11/issues/111.
If the log file is configured for appending and rotation_size limit is set,
text_file_backend::consume would repeatedly attempt to reopen the log file with
a new counter value in attempt to find a file with a size below the
rotation_size limit. This logic breaks if the file name pattern does not
include a file counter placeholder, as it means the backend would repeatedly
attempt to open the same file, whose size would exceed the limit. The loop
would terminate after 2^32 iterations, but that may take a while.
Avoid this fallback if we know the file counter placeholder is missing
in the file name pattern.
Also, make fil size checks more robust against integer overflows.
Fixes https://github.com/boostorg/log/issues/252.
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.
Boost.Random imposes excessive compiler requirements that prevents
Boost.Log from being built and tested with 32-bit gcc 8 on MinGW-w64.
We only need a fast RNG to quickly shuffle sinks in case of thread
contention in the core.
Use a local implementation of xorshift64 for such an RNG, which should
be even faster than taus88 and have sufficiently good quality. Also,
use std::random_device to initialize the PRNG. Keep the clock/thread_id
based initialization as a backup, in case if std::random_device fails.
Refs https://github.com/boostorg/random/issues/131.
Boost.ASIO depends on Boost.Context, which requires cxx11_thread_local
that is not supported on this target. This prevents Boost.Log from
being built and tested.
Refs https://github.com/chriskohlhoff/asio/issues/1637.
This lets users to disable Boost.ASIO-related functionality and remove
the dependency on Boost.ASIO. This may be useful on platforms where
Boost.ASIO or its dependencies don't work or disabled.
Refs https://github.com/chriskohlhoff/asio/issues/1637.
The windows-2019 image is deprecated and will soon be removed. This
means MSVC versions prior to 14.3 are no longer tested in GitHub
Actions, only on AppVeyor CI.
In order to avoid CI job timeouts, split MSVC 14.3 into two jobs,
one for C++14 and extra header tests and another one for other
C++ versions.
adaptive_mutex now uses Boost.Atomic on all platforms that support
lock-free atomics native waiting/notifying operations for unsigned int
and pthreads on the other platforms. Windows always uses Boost.Atomic.
The new implementation blocks the thread after a number of attempts
to acquire the lock with spinning backoff. This should reduce CPU load
if for some reason the thread that owns the lock is holding it for a
long time (which typically should not happen, since adaptive_mutex is
currently only used in threadsafe_queue, which doesn't hold the lock
for too long, unless the holder gets preempted).
The change may be significant on POSIX systems, which previously always
used pthreads, and performance characteristics of pthread_mutex_t could
have been different from our Boost.Atomic-based implementation.
If native atomic int32 is not supported, Boost.Log disables IPC utilities,
so make a similar check in tests Jamfile to disable the corresponding tests.
Only include capabilities.hpp to test whether native atomic int32
is supported.
Also added a dependency on Boost.Atomic, which may be needed in
modular builds.
We are only interested in whether a config flag is defined, the value
of the define is irrelevant. So instead of checking for a value of 1,
detect the flag with any value, if present.
* Make the library modular usable.
* Switch to library requirements instead of source. As source puts extra source in install targets.
* Clean up build dependencies.
* Remove external build references and avoid custom project loading.
* Use relative paths to declare config sub-projects.
* Add missing NO_LIB usage requirements.
* Add missing library ref.
* Add missing import-search for cconfig/predef checks.
* Add requires-b2 check to top-level build file.
* Update dependencies.
* Bump B2 require to 5.2
* Update copyright dates.
* Move inter-lib dependencies to a project variable and into the build targets.
* Remove custom symbolic project names for config subprojects. And use project root relative targets.
* Move private deps to the build project.
* Put back default boost locale link as locale build is now fixed.
* Set default address-model and architecture to avoid extra/custom detection logic. Put back missing check and config rules.
* Adjust doc build to avoid boost-root references.
* Fix ref to predef.jam location.
* Have B2 build use same deps as CML for per-target private/public.
* Add log dep to log_setup, as it's needed on some platforms.
* Add boost_log_with_support target to mirror CML.
* Fix platform specific winapi dependency spec.
If text_file_backend is set up to append to a previously written file, and
the actively written file name pattern does not include a file counter
placeholder but the target file name pattern does, we used to skip incrementing
the file counter in an attempt to generate the same file name as was last used,
so that we open the last used file for appending. While it did result in
reusing the last written file, since the counter was not incremented, the next
rotation would generate the last used target file name, which would result in
overwriting the last rotated file instead of adding a new file to the storage.
To mitigate this, only skip incrementing the counter if the file name pattern
for the actively written file actually has a counter placeholder. This way,
the counter will get incremented in the case described above, and on rotation
a new target file name will be generated.
Fixes https://github.com/boostorg/log/issues/245.
Presumably, windmc.exe from MinGW-w64 fails if the output directory
doesn't exist. So create it prior to running the tool.
Additionally, removed explicit markup of the tool outputs as generated
sources. This should be done automatically by add_custom_command.
Also, added the max CMake version to silence its warnings.