2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-19 16:32:09 +00:00

57 Commits

Author SHA1 Message Date
Andrey Semashev
3efa06b889 Removed disablement of IPC utilities on Cygwin in tests and examples. 2025-12-26 17:22:43 +03:00
Andrey Semashev
ad2eb6c4e5 Added docs, examples and test for wrap_formatter. 2025-07-11 10:28:46 +03:00
Andrey Semashev
86c8cdcced Added a wrap_filter utility.
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.
2025-07-11 03:23:01 +03:00
Andrey Semashev
ecc4466bc0 Added BOOST_LOG_WITHOUT_ASIO config option.
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.
2025-06-13 17:17:31 +03:00
René Ferdinand Rivera Morell
2530a4e03a Add support for modular build structure. (#233)
* 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.
2025-05-26 00:48:16 +03:00
Andrey Semashev
26c93dc061 Replaced Boost.Thread synchronization primitives with std equivalents.
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.
2024-08-16 20:01:18 +03:00
Andrey Semashev
7ddeff52f1 Removed dependency on Boost.LexicalCast. 2023-08-25 14:48:46 +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
de4e85e9b3 Switched to c++-template-depth feature instead of explicit compiler flags.
This allows to specify the limit for other compilers that support it
and remove it for clang-cl, which doesn't.
2020-09-08 18:23:57 +03:00
Andrey Semashev
4ef885fc7a Moved MSVC C/C++ runtime deprecated macros to a common place.
The _SCL_SECURE_NO_WARNINGS, _SCL_SECURE_NO_DEPRECATE,
_CRT_SECURE_NO_WARNINGS and _CRT_SECURE_NO_DEPRECATE macros need to be
defined for every compiler that uses MSVC C/C++ runtime, so instead of
duplicating these definitions in multiple places, define them for
Windows platform regardless of the compiler. In particular, they are
now defined for clang-cl.
2020-09-08 18:20:13 +03:00
Andrey Semashev
68d38321b3 Updated deprecated uses of boost::bind to silence warnings. 2020-03-04 00:44:23 +03:00
Andrey Semashev
4c7d98843f Use make_attr_ordering with explicit attribute value type.
Explicit specification of attribute value type is necessary when it cannot
be inferred from the function object type. With C++20 removing argument type
typedefs from standard function objects, like std::less, and compilers following
suit (e.g. future MSVC versions), it is better to update the example so that
it is compatible with future compilers.

Related to https://github.com/boostorg/log/issues/105.
2020-03-03 23:09:41 +03:00
Andrey Semashev
1ce3c06ac6 Added a compilable example for initialization from a settings container.
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.
2019-06-25 20:10:50 +03:00
Andrey Semashev
a71dc018a8 Renamed settings_file_formatter_factory to settings_file_custom_factories.
Also, updated the example to register filter/formatter factories for the
custom severity level.
2019-06-25 19:25:45 +03:00
Andrey Semashev
08bd1fb809 Added support for trivial::severity_level to filter/formatter parsers.
The default filter/formatter factories will now be able to extract severity
level values of type boost::log::trivial::severity_level. For filters, this
is only supported for attributes with the "Severity" name.
2019-06-25 18:54:55 +03:00
Andrey Semashev
1138b47fce Removed linking with Boost.System.
Since Boost.System is now header-only, no need to link with the library.
2019-01-14 20:16:20 +03:00
Andrey Semashev
effd8568a4 Disable Boost.Interprocess on Cygwin.
Boost.Interprocess doesn't compile on Cygwin:

https://github.com/boostorg/interprocess/issues/76

Also, disable affected tests and examples.
2019-01-06 19:51:48 +03:00
Andrey Semashev
fae655dbbd Don't use Boost.ASIO-related features in examples when Boost.ASIO is not available. 2019-01-06 19:51:37 +03:00
Andrey Semashev
136fd2bdfd CI compilation fixes for Cygwin and MinGW.
Some tests pull in pthread rwlock and therefore need _XOPEN_SOURCE=600
or higher to compile. Added platform defines to tests and examples
for good measure.

For MinGW worked around Boost.Build error when BOOST_LOG_WITHOUT_EVENT_LOG
is defined.
2019-01-06 14:13:32 +03:00
Andrey Semashev
947d4361d4 Added a check for message compiler on Windows when building examples.
Disable event log examples when message compiler is not available. This
should hopefully fix MinGW failures in CI.
2019-01-06 02:17:46 +03:00
Andrey Semashev
e823f88467 Added support for a separate target file name pattern in text file sink.
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.
2019-01-05 21:15:33 +03:00
Andrey Semashev
7cf231cfc3 Add quotes around strings to avoid bjam warnings. 2018-08-20 15:27:32 +03:00
Andrey Semashev
95ebf8c62d Post-merge corrections. 2018-06-01 14:18:46 +03:00
Brian Kuhl
26e36fbc1d Review changes; keep example clean, consolidate BOOST_LOG_NO_GETPWUID_R 2018-04-29 20:54:01 -04:00
Brian Kuhl
1f6543e94c Merge remote-tracking branch 'upstream/develop' into develop
# Conflicts:
#	src/dump.cpp
2018-04-24 23:58:12 -04:00
Andrey Semashev
ccf5e745aa Updated IPC queue example to compile in C++03 mode with gcc.
The example uses IPC queue operation_result as a namespace qualifier for
the values of the enum. This is allowed in C++11 and some compilers also allow
it in C++03. This is the preferred use of the enum values, so in the official
docs that kind of use is still displayed. For compatibility with C++03 though
an additional hidden code branch is added that refers to the constants without
qualification.
2018-01-03 19:54:34 +03:00
Brian Kuhl
833b00546e Get IPC to compile on VxWorks by adding:
BOOST_LOG_NO_GETPGRP
BOOST_LOG_NO_GETSID
BOOST_LOG_NO_LOCALE
2017-09-09 23:08:16 -04:00
Andrey Semashev
6e2632c804 Silenced MSVC warning about a narrowing conversion. 2017-03-25 20:44:32 +03:00
Andrey Semashev
70debc533b Changed the max_size decorator so that the overflow marker length is
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.
2016-08-09 04:20:49 +03:00
Andrey Semashev
fc398fc04d Updated example to make sure an exception is thrown. 2016-07-17 19:41:43 +03:00
Andrey Semashev
7624cf57b9 Added docs for reliable_message_queue. 2016-07-17 15:43:34 +03:00
Andrey Semashev
3c92751c56 Working on documentation for IPC tools. 2016-06-05 22:28:54 +03:00
Andrey Semashev
61e9db5406 Renamed sinks_ipc_viewer.cpp to sinks_ipc_receiver.cpp. 2016-06-05 17:25:02 +03:00
Andrey Semashev
05826649a0 Extracted platform-specific logic regarding interprocess object names to a separate object_name wrapper. Use this wrapper wherever interprocess queue name was used. Added a test for the wrapper. Extracted auto_handle to a separate header. 2016-04-14 19:32:04 +03:00
Andrey Semashev
1852ded16f Updated IPC examples to be compatible with the actual implementation. 2016-04-14 19:32:04 +03:00
Andrey Semashev
89d56bc12a Compilation fixes on Windows. 2016-04-14 19:32:03 +03:00
Lingxi-Li
8d9002cab8 Add text_ipc_message_queue_backend
This new sink backend supports logging messages to an interprocess
message queue.
2016-04-14 19:32:02 +03:00
Andrey Semashev
5de58e8a61 Added documentation and comments. 2016-02-25 22:07:29 +03:00
Erich Keane
2b9cf67a4a Add max_files parameter to the examples that use make_file_collector 2015-12-29 11:16:51 -08:00
Andrey Semashev
7cbcf861e5 Improved docs. 2015-04-04 16:01:16 +03:00
Andrey Semashev
18df30ed33 Followup for the previous commit. 2015-03-25 00:48:52 +03:00
Andrey Semashev
71b12228f1 Disabled warning C4003 on MSVC 8 (VS2005). The warning was caused by Boost.PP macros used in Boost.Fusion and as reported by Boost.PP maintainer cannot be worked around locally in the macro definition. 2015-03-10 02:09:31 +03:00
Andrey Semashev
5bb604ee39 Updated copyright dates. 2015-01-25 17:32:33 +03:00
Andrey Semashev
9e4c006c03 XML character decorator now escapes quote characters. 2014-09-09 21:44:56 +04:00
Andrey Semashev
d706f38e5b Disabled yet another useless warning of Intel Compiler. 2014-07-07 23:02:52 +04:00
Andrey Semashev
d90b457110 Added support for MSVC 14 CTP. 2014-07-05 20:19:40 +04:00
Andrey Semashev
40d5720f9e Disabled more of Intel warnings. 2014-06-23 15:35:45 +04:00
Andrey Semashev
166616c796 Changed all references to empty_deleter to null_deleter in Boost.Core. 2014-06-03 23:09:21 +04:00
Andrey Semashev
a21d096e4a Updated copyright notes to 2014. 2014-01-19 18:46:09 +04:00
Andrey Semashev
4399331206 Merged recent changes from trunk
[SVN r86659]
2013-11-12 19:46:37 +00:00