2
0
mirror of https://github.com/boostorg/log.git synced 2026-02-09 11:12:38 +00:00
Commit Graph

113 Commits

Author SHA1 Message Date
Andrey Semashev
489ac05ddd Extracting interprocess message queue to separate headers/sources. 2016-04-14 19:32:03 +03:00
Andrey Semashev
9f1978619b Extracted permissions wrapper to a separate header. Avoid using shared_ptr on Windows and add interop with Boost.Interprocess. 2016-04-14 19:32:03 +03:00
Andrey Semashev
0cc56f385e Trim trailing spaces. 2016-04-14 19:32:02 +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
5b8575cfab Added max_files to parser_utils and init_from_settings 2015-12-29 11:20:57 -08:00
Erich Keane
5234253333 Added max_files option to text_file_backend's file_collector
As requested here: https://svn.boost.org/trac/boost/ticket/8746
this commit introduces the boost::log::keywords::max_files keyword
and implements this functionality in the file collector.

Additionally, the non-keyword make_collector call has max_files added as
a uintmax_t parameter, which has a default value as to not break
existing code.

The purpose of this is to limit the total number of files in the
collected logs.  If not specified, the limit will be
std::numeric_limits<uintmax_t>::max(), which is likely greater than the
capacity of the filesystem.
2015-12-29 11:07:41 -08:00
Andrey Semashev
1f32d51dce Added branch prediction hints. 2015-12-20 23:12:35 +03:00
Andrey Semashev
a31ec74e51 Make sure that Windows API version is consistent for all sources.
Include winapi/config.hpp as soon as possible; avoid including even
Boost.Config before it so that it doesn't set Windows API version
accidentally by including some third party header. In all source files,
include detail/config.hpp or detail/setup_config.hpp first thing.

Moved all WinAPI config macros to the Jamfile.v2 and removed
windows_version.hpp as it was no longer needed. Also enabled inclusion of
windows.h while compiling the library.

Removed auto-linking with psapi.lib and advapi32.lib as it was no longer
working after ecf3114. Added linking with advapi32.lib to Jamfile.v2.
2015-12-20 21:05:28 +03:00
Andrey Semashev
c6f09d69c8 Fixed compilation on POSIX-like systems. Ported GetTickCount64 emulation to Boost.Atomic and got rid of union-based type punning as it is formally an UB. 2015-12-20 18:15:38 +03:00
Andrey Semashev
388a3e2126 Switch more code to the WinAPI abstraction layer. Use GetModuleHandleW and get_proc_address everywhere to avoid compilation errors for Windows CE. 2015-12-20 17:26:34 +03:00
Andrey Semashev
88ec57deac Avoid including unneeded Windows headers when SSSE2/AVX2 are not enabled. This hopefully fixes including a missing header on Windows CE. 2015-12-20 15:18:18 +03:00
Andrey Semashev
eeb9ddb1b8 Move some includes to more correct places. 2015-12-20 14:33:48 +03:00
Andrey Semashev
f667fdd8fd Undef BOOST_AUTO_LINK_NOMANGLE after it's been used. 2015-12-20 14:32:13 +03:00
Andrey Semashev
f75dd58956 Merge pull request #20 from remote-tracking branch 'muggenhor/no-undesired-auto-linking' into develop. 2015-12-20 14:29:02 +03:00
Andrey Semashev
b5969e5233 Changed adaptive_mutex to use pthread_mutex_t. On systems that support it (Linux, FreeBSD, OpenBSD) PTHREAD_MUTEX_ADAPTIVE_NP is used, otherwise the default mutex type. This greatly imporoves performance in case of heavy thread contention: 100 threads - x2.7 records per second, 1000 threads - x4. Less contended cases are mostly unaffected. 2015-11-15 17:18:48 +03:00
Andrey Semashev
5434177322 Renamed spin_mutex.hpp to adaptive_mutex.hpp. 2015-11-15 16:12:13 +03:00
Andrey Semashev
8da446c6d0 Made sure that header.hpp is included last. Also removed the unneeded set_content(0); on TLS creation. 2015-11-10 01:05:51 +03:00
Andrey Semashev
f9dfc45d85 Cleaned up the TLS implementation to avoid reinterpret_casts and associated warnings about violating strict aliasing rules. 2015-11-10 00:59:21 +03:00
Giel van Schijndel
ecf311409b Don't auto-link when the user requested that we don't 2015-10-30 14:51:09 +01:00
Andrey Semashev
6845eb43cc Use Boost.Atomic for atomic operations. Remove obsolete atomic_queue.hpp header. 2015-10-15 22:52:06 +03:00
Andrey Semashev
c7f18fd7ab Replaced BOOST_LOG_USE_WINNT6_API macro with BOOST_USE_WINAPI_VERSION. The target Windows version is now selected with the WinAPI submodule. Also simplified a few preprocessor checks and updated docs. 2015-10-14 22:04:02 +03:00
Andrey Semashev
d242967b52 Added a link to Boost.DateTime ticket for the facet visibility bug. 2015-10-04 23:05:43 +03:00
Andrey Semashev
284d5e6139 Added a workaround for incorrect file name generation in text file sink backend, when the file name contains date/time placeholders. Fixes #11691. 2015-10-04 18:37:05 +03:00
Andrey Semashev
63f7d70a07 Mode robust check for _POSIX_TIMERS. 2015-08-27 17:47:05 +03:00
Ed Schouten
42e6f26c43 Enable the use of clock_gettime() on Nuxi CloudABI.
Just like OpenBSD and HURD, CloudABI provides a clock_gettime() function
without implementing timer_*(). It therefore cannot set _POSIX_TIMERS.
2015-08-27 15:54:58 +02:00
Andrey Semashev
e8c6688fcd Fixed compilation for Android. Fixed #11559. 2015-08-23 14:06:17 +03:00
Andrey Semashev
87db169efe Fixed compilation with clang on Linux. 2015-07-27 14:49:33 +03:00
Andrey Semashev
f9338127b7 Fixed compilation on MSVC. More correct C++11 code conversion facets detection. Updated unhandled_exception_count() to use std::uncaught_exceptions() from C++17, where available (MSVC-14, currently). 2015-07-26 17:38:15 +03:00
Andrey Semashev
92f565f911 Corrected snprintf use. 2015-07-26 14:04:16 +03:00
Andrey Semashev
7d7b70e78b The default formatter has been rewritten to avoid using Boost.Phoenix.
This reduces compile times and binary sizes. It should also fix compilation with compilers not able to handle Boost.Phoenix (see #11200).

Also, date/time format has changed. The default formatter will produce dates with numeric months instead of abbreviated month names (see #8839).

The standard attribute value types supported by default parsed formatters now include char16_t and char32_t, when available. This required to add new code conversion routines.

Added Boost.PP sequences with the standard types. These are used to generate the corresponding type sequences, which is faster to compile than doing this with Boost.MPL.
2015-07-25 23:58:02 +03:00
Andrey Semashev
ac70fa34c1 Removed use of auto_ptr. 2015-07-18 20:32:07 +03:00
Andrey Semashev
cb68c029e2 Made message_file parameter optional if registration parameter is never. It is not used anyway. 2015-07-17 20:54:41 +03:00
Andrey Semashev
21e60917cc Corrected comment. 2015-07-17 03:22:22 +03:00
Andrey Semashev
2d8378a6e2 Fixes 11459. Added function exports. 2015-07-10 22:53:02 +03:00
Andrey Semashev
2c26ec929a Minor code simplification. 2015-07-05 22:18:15 +03:00
Andrey Semashev
30e7f03631 Fixes #11398. Improved the event synchronization primitive.
The updated implementation relies on Boost.Atomic for atomic operations which provides better portability. On Linux the implementation uses futexes directly, which should improve performance slightly. The event implementation choice should be more stable across different compiler versions because of these changes.
2015-07-05 22:00:03 +03:00
Andrey Semashev
c98b1f459a Fixes #11446. Add support for OpenBSD (clock_gettime). 2015-07-05 19:06:18 +03:00
Andrey Semashev
7dea4539d6 Reverted the TLS config enforcement for Boost.ASIO.
Partially reverts 89474f4a80 and a9738b1249. During the discussion on the ML, there was opinion that Boost.Log should not influence other libraries' configuration. This can cause ODR violations and cause surprises to the users.

The long term solution will be removal of Boost.ASIO and re-implementing network abstraction layer. For now users are required to configure each library separately. This requirement has been documented.
2015-07-05 18:52:29 +03:00
Andrey Semashev
d720a11e3b Fixed #11190. Constructing attribute value set from attribute sets or inserting elements could invalidate elements that were in the container. 2015-04-25 22:49:01 +03:00
Andrey Semashev
34e68c7b5a Ported from std::random_shuffle and std::rand to Boost.Random and custom random_shuffle implementation. 2015-03-29 20:12:58 +03:00
Andrey Semashev
f1337c6fbc Ported library to Boost.TypeIndex. This solves symbol visibility problems with Clang on Linux when the library is built with -fvisibility=hidden. 2015-03-28 21:20:55 +03:00
Andrey Semashev
2e7eb45f48 Removed unused data member. 2015-03-28 20:12:19 +03:00
Andrey Semashev
f74a7df2df Fixed #11148. Fixed incorrect behavior of attribute_value_set::size() if a large number of attribute values are inserted into the set. 2015-03-28 19:04:31 +03:00
Andrey Semashev
18df30ed33 Followup for the previous commit. 2015-03-25 00:48:52 +03:00
Andrey Semashev
89474f4a80 Define ASIO config macros before using it. Use hidden visibility by default.
Boost.ASIO should not use compiler-based TLS unless it is allowed by the user of Boost.Log, otherwise the Boost.Log config option has no practical effect.
As a result, it becomes more probable that Boost.ASIO will be compiled with different config macros in Boost.Log and user's code. As a partial solution use
hidden visibility when building Boost.Log shared libs and ensure it uses its local copy of Boost.ASIO. Added a config test to detect support for visibility
command line option.

Also adjusted project names of other config tests to avoid possible name clashes with other libraries and Boost.Build infrastructure.

MSVC warning 4003 is now silenced on all compiler versions as apparently not only MSVC 8 is affected.
2015-03-25 00:32:36 +03:00
Andrey Semashev
30ff0390ce Fixed #11106. In some cases inserted attribute set elements could invalidate the existing elements preventing them from being found. 2015-03-15 15:00:53 +03:00
Andrey Semashev
4751a16536 Added compilation workarounds for MSVC 2015 CTP6. 2015-03-01 21:22:46 +03:00
Andrey Semashev
7ebfd3b6c4 Fixes #11016. Text file sink no longer creates lots of empty files if there is no free space on the file system. 2015-02-14 19:19:42 +03:00
Andrey Semashev
3ef16ab89b Fixed compilation on GNU Hurd. 2015-01-25 18:06:06 +03:00