2
0
mirror of https://github.com/boostorg/log.git synced 2026-02-02 08:52:14 +00:00
Commit Graph

822 Commits

Author SHA1 Message Date
Andrey Semashev
f6808349bf Added a note about C++03 deprecation. boost-1.82.0 2023-03-29 02:14:28 +03:00
Andrey Semashev
603accc4c7 Merge pull request #206 from maximd-g/develop
Fix a typo in scoped_feeding_operation
2023-03-27 13:30:56 +03:00
maximd-g
051f696589 Fix a typo in scoped_feeding_operation 2023-03-27 12:42:16 +04:00
Andrey Semashev
56674b03ca Added -lubsan linker flag to work around linking errors with clang UBSAN.
Works around https://github.com/llvm/llvm-project/issues/60578.
boost-1.82.0.beta1
2023-02-28 05:14:45 +03:00
Andrey Semashev
1019905128 Removed inclusion of Boost.Predef and Boost.Preprocessor in config.hpp.
Those includes could be avoided relatively easily, so drop those to
reduce code footprint.
2023-02-27 20:00:01 +03:00
Andrey Semashev
5e2d93d229 Marked value_ref default constructor as constexpr. 2022-12-22 15:00:04 +03:00
Andrey Semashev
f5fbec2deb Removed superfluous value_ref copy constructor.
The implicitly generated copy constructor is fine.

Fixes https://github.com/boostorg/log/issues/201.
2022-12-22 14:54:45 +03:00
Andrey Semashev
9be578442e Moved snprintf.hpp to Boost.Core. 2022-12-09 04:48:09 +03:00
Andrey Semashev
3f22dbe131 Updated to GHA checkout@v3 to avoid deprecation warnings. boost-1.81.0 boost-1.81.0.beta1 2022-10-18 18:00:26 +03:00
Andrey Semashev
5782827b55 GitHub Actions config update.
- Added gcc-12 and clang-13 through 15 jobs.
- Added C++23 testing for gcc and clang on Linux.
- Updated clang version for UBSAN job.
- Updated Ubuntu version for clang jobs to avoid having to use external APT
  repository.
- Updated python package installation for compatibility with Ubuntu 22.04.
2022-09-10 01:38:03 +03:00
Andrey Semashev
f8b3ad8850 Fixed a typo. 2022-08-29 02:59:20 +03:00
Andrey Semashev
b7cfe7ee0e Wording improvements in the docs. 2022-08-29 00:23:44 +03:00
Andrey Semashev
01d627a480 Updated docs copyright years. 2022-08-28 23:40:06 +03:00
Andrey Semashev
dcea5e6b0f Added a docs section discussing Boost.Log use in libraries.
Closes https://github.com/boostorg/log/issues/193.
2022-08-28 23:39:59 +03:00
Andrey Semashev
93174ac2c6 Switched gcc-9 to ubuntu-20.04 GHA CI image. 2022-08-14 17:54:25 +03:00
Andrey Semashev
4f28b2894b Replaced ubuntu-18.04 GHA CI images with containers.
Also use ubuntu-latest image for jobs that are running in a container.
2022-08-14 14:09:46 +03:00
Andrey Semashev
e078fc69cd Switch to macos-11 GHA image as macos-10.15 is deprecated. 2022-08-12 16:01:22 +03:00
Andrey Semashev
fa675cca2b Switched to Boost.TypeTraits from Boost.MPL for sink init helpers. boost-1.80.0.beta1 boost-1.80.0 2022-06-24 18:20:58 +03:00
Andrey Semashev
34304f253f Fixed a typo causing missing includes. 2022-06-08 16:57:33 +03:00
Andrey Semashev
cb3d7c5b08 Ported some components from Boost.MPL to Boost.TypeTraits and pure C++. 2022-06-08 14:52:54 +03:00
Andrey Semashev
de974a6c70 Updated copyright years in AppVeyor CI config. 2022-06-06 03:32:20 +03:00
Andrey Semashev
e6e59f350f Added VS2022 job and C++20 jobs to AppVeyor CI. 2022-06-06 03:30:50 +03:00
Andrey Semashev
269cedff6c Added a workaround for std::codecvt::do_length bug in libstdc++.
Apparently, std::codecvt::do_length in libstdc++ from gcc 11.2 accesses
input characters outside the input range if max is specified larger than
the input range. This causes buffer overflow and a crash. Use the input
range size as the max limit, which should have the same effect as the
previous hardcoded limit.

gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105857
2022-06-05 18:29:30 +03:00
Andrey Semashev
77f1e20bd6 Ported strictest_lock from mpl::integral_c to boost::integral_constant.
This removes one dependency on Boost.MPL and should resolve compiler warnings
coming from mpl::integral_c definition (integral_c defines typedefs for
previous and next values, which cannot be deduced for enums).
2022-06-05 17:15:09 +03:00
Andrey Semashev
dda118619a Fixed binding IPv4 local address in syslog_backend when IPv6 target is used.
Fixes https://github.com/boostorg/log/issues/181.
2022-04-22 18:14:11 +03:00
Andrey Semashev
98479a4f25 Work around MSVC 14.0 ICE in invoke_manip. boost-1.79.0.beta1 boost-1.79.0 2022-02-27 19:47:41 +03:00
Andrey Semashev
0e4a467573 Define a config macro for gcc 4.6 not supporting defaulted virtual dtors. 2022-02-27 05:52:12 +03:00
Andrey Semashev
a268b41149 Added a new invoke stream manipulator.
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.
2022-02-27 05:43:11 +03:00
Andrey Semashev
9bcde8b4ec Workaround gcc 4.6 not supporting defaulted virtual destructors. 2022-02-27 04:37:17 +03:00
Andrey Semashev
69ec057e7c Added support for appending to files with file counter placeholders in names.
Previously, text_file_backend would generate a new file name when the file
name pattern contained a file counter placeholder, which prevented appending
to the file. Appending was only possible when the active file name was
stable across process restarts (effectively, this prohibited the file counter
to be used in the active file name).

This commit adds support for appending in such configuration. The file
collector has been updated to return the last found file counter during
filesystem scanning, and the sink backend doesn't increment it when the initial
file is opened, when appending is enabled, and when the file to be opened
exists and, if file collector is used, is in the target storage of the file
collector. In all other cases the file counter is incremented, which leaves
the behavior unchanged.

Closes https://github.com/boostorg/log/issues/179.
2022-02-27 00:03:37 +03:00
Andrey Semashev
656fd1b0c1 Avoid updating file counter in scan_for_files if no new files are found.
This prevents the file counter from being reset to zero if scan_for_files
is called multiple times, and subsequent calls don't find any new files.

Reported in https://github.com/boostorg/log/issues/179.
2022-02-26 16:01:21 +03:00
Andrey Semashev
d78f9c1fd5 Added a warning about using named scopes with coroutines and similar APIs.
This is in response to https://github.com/boostorg/log/issues/178.
2022-02-10 23:56:28 +03:00
Andrey Semashev
4973d4154d Extracted Boost library include paths collection to a CMake module.
Also, save the collected paths to a global property to avoid potentially
scanning the filesystem in every library that needs these paths.
2022-02-04 14:44:06 +03:00
Andrey Semashev
a3717b0ccf Merge pull request #155 from wzssyqa/wzssyqa-patch-1
Rename mips1 to mips
2021-12-10 01:47:02 +03:00
Andrey Semashev
8024d7c9c9 Enabled matches with Boost.Xpressive test for gcc 11.2 and newer.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102293 is fixed in gcc 11.2.
2021-12-02 17:57:04 +03:00
Andrey Semashev
1aaf946b18 Updated check for apt-add-repository capabilities.
In Ubuntu 20.04 there appeared an updated version of the
software-properties-common package in focal-updates, which ships a newer
apt-add-repository version that doesn't support -P/-S/-U command line arguments.

Since we cannot rely on package version checks to determine apt-add-repository
capabilities, we have to parse its --help output instead.

Also, made source list processing more protected against spaces.
boost-1.78.0
2021-11-16 00:50:58 +03:00
Andrey Semashev
036bd4fffd Removed workaround dependency on Boost.Align that was missing in Boost.ASIO. 2021-11-13 01:20:26 +03:00
Andrey Semashev
ebaabd9c57 Removed auto-linking Boost.System and Boost.DateTime.
Boost.System and Boost.DateTime are header-only now. We used to include
Boost.System config header to auto-link with it (which it no longer does)
and manually auto-link Boost.DateTime. The latter caused a problem with
partial Boost checkout and build/install, when the enabled dependencies were
derived from the Boost.Log Jamfile, which does not contain a dependency on
DateTime.

Closes https://github.com/boostorg/log/issues/166.
boost-1.78.0.beta1
2021-11-04 00:02:58 +03:00
Andrey Semashev
d55f122f74 Added notes for CMake users in the docs. 2021-10-31 03:42:19 +03:00
Andrey Semashev
e90d4b7a8d Added a release note for added support for CMake. 2021-10-30 20:42:42 +03:00
Andrey Semashev
2985dfecc0 Added CMake build script and test. 2021-10-30 20:39:49 +03:00
Andrey Semashev
1303a7a92c Suppress MSVC warning about possible loss of data. 2021-10-30 00:12:15 +03:00
Andrey Semashev
dd164ac8d0 Changed SSSE3/AVX2 checks to be linkable into an executable. 2021-10-29 04:14:58 +03:00
Andrey Semashev
e957369c80 Explicitly specify attribute value type for make_attr_ordering in examples.
C++20 removed argument type typedefs in standard function objects, which made
it impossible to deduce the attribute value type from the standard function
objects. This caused compilation errors with VS2022 in C++20 mode.
2021-10-26 00:56:17 +03:00
Andrey Semashev
832979ebd2 Added clang-win jobs to AppVeyor CI. 2021-10-25 02:01:25 +03:00
Andrey Semashev
6c9d326e5b Updated copyright years. 2021-10-25 01:58:04 +03:00
Andrey Semashev
9238377f1f Corrected placement of alignas. 2021-10-25 01:51:17 +03:00
Andrey Semashev
b15d02ab3b Added workarounds of older gcc and clang for AVX2 dump implementation.
Use inline asm instead of _mm256_broadcastsi128_si256 to work around issues:

 - gcc 4.7 is missing _mm256_broadcastsi128_si256 declaration in immintrin.h.
 - gcc 4.8 generates vmovdqu+vinserti128 instead of a single vbroadcasti128.
 - clang up until 4.0 generates vmovdqu+vinserti128 or worse.
2021-10-25 01:34:56 +03:00
Andrey Semashev
63325283f5 Improved performance of SSSE3/AVX2 implementations of dump manipulator.
Use byte shuffle instead of arithmetics and masking to convert half-bytes
to characters.

Since the new algorithm more heavilly relies on pshufb, and it is slow
on some older Intel Atom CPUs, retain the old implementation and use it
when we know pshufb is slow. We might drop it eventually.
2021-10-24 21:18:10 +03:00
Andrey Semashev
1d6a8d9a50 Added a dummy export from boost_log_setup if settings parsers are disabled.
When settings parsers were disabled by a config macro, boost_log_setup would
be empty, and MSVC linker would produce no library at all. This broke
installing Boost.Log, as Boost.Build would expect a library file to be present.

We're adding a dummy export from the library as a workaround, so that the
library is always created, even if empty. This workaround should be considered
temporary, until we can disable the library proper after a Boost.Build bug
is fixed:

https://github.com/bfgroup/b2/issues/104

Closes https://github.com/boostorg/log/issues/164.
Closes https://github.com/boostorg/log/pull/165.
2021-10-24 16:09:04 +03:00