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

704 Commits

Author SHA1 Message Date
Andrey Semashev
e7d4fd2d13 Include config.hpp before checking BOOST_LOG_WITHOUT_SYSLOG.
Boost.Log's config.hpp may define BOOST_LOG_WITHOUT_SYSLOG if no native
syslog API or Boost.ASIO is available, so we need to include the header
before checking the macro.

Closes https://github.com/boostorg/log/pull/123.
boost-1.74.0
2020-08-01 21:59:33 +03:00
Andrey Semashev
027c334063 Marked system library targets explicit. boost-1.74.0.beta1 2020-06-08 01:06:59 +03:00
Andrey Semashev
2b28f477c5 Disable gcc warnings about ignoring attributes on _SECURITY_ATTRIBUTES. 2020-06-07 19:09:46 +03:00
Andrey Semashev
477c766384 Added a FreeBSD job in Travis CI. 2020-06-07 00:51:32 +03:00
Andrey Semashev
2e93f7d86e Added gcc 10 build jobs to Travis CI. 2020-05-22 18:25:47 +03:00
Andrey Semashev
76baf3fd3e Added notes about lifetime of objects used with manipulators. 2020-05-13 19:53:32 +03:00
Andrey Semashev
00b051011c Removed unnecessary check for stream being good.
The stream will be checked in the operator<< of the value anyway, and we don't
save much performance by checking the stream before invoking
optional_manipulator::output.
2020-05-12 11:25:55 +03:00
Andrey Semashev
65037a0c2f Added optional_manip output manipulator for formatting optional values. 2020-05-12 01:34:46 +03:00
Andrey Semashev
a2cb720ed1 Added tuple_manip output manipulator for formatting heterogeneous sequences. 2020-05-12 01:33:36 +03:00
Andrey Semashev
15f5f4ed58 Added range_manip output manipulator for formatting ranges. 2020-05-11 23:37:30 +03:00
Andrey Semashev
d4db5c3937 Upgraded UBSAN to clang 10.
https://github.com/boostorg/xpressive/pull/13 has been merged, which means
Boost.Xpressive issue should be fixed.
2020-05-10 23:33:02 +03:00
Andrey Semashev
e675ff1171 Marked keywords as inline variables. 2020-05-10 19:28:48 +03:00
Andrey Semashev
157e45ef0a Downgrade UBSAN to clang 9 to work around the bug in Boost.Xpressive. 2020-05-08 02:44:57 +03:00
Andrey Semashev
8c12f2305e Added a release note about added noexcept markup. 2020-05-07 21:31:23 +03:00
Andrey Semashev
9a85efde08 Added noexcept specifiers. Made logger move ctors more noexcept-friendly.
Logger move constructors don't need to add the attributes to the logger
attributes since the latter are moved from the source logger, just as the
attributes. This allows move constructors to be noexcept, provided that
they are non-noexcept for other reasons.

Closes https://github.com/boostorg/log/issues/121.
2020-05-07 20:35:14 +03:00
Andrey Semashev
706fed3bf4 Avoid unnecessary copy of the filename string. 2020-05-07 17:48:38 +03:00
Andrey Semashev
4d16fb6608 Disable UBSAN tests in C++20 mode to work around Boost.Xpressive bug.
UBSAN inticates test failures caused by Boost.Xpressive. To be fixed by:

https://github.com/boostorg/xpressive/pull/13
2020-05-07 17:34:42 +03:00
Andrey Semashev
89d1ff541d Added clang-10 jobs to Travis CI. 2020-05-05 23:06:33 +03:00
Andrey Semashev
a79103cb3d Removed linking with Boost.DateTime.
Boost.DateTime is now header-only.
2020-05-05 14:41:56 +03:00
Andrey Semashev
9b6422cdad Merge pull request #120 from EugeneZelenko/use-boost-override
Use BOOST_OVERRIDE to fix GCC -Wsuggest-override and Clang-tidy moder…
2020-05-04 17:20:07 +03:00
Eugene Zelenko
4019d171a3 Use BOOST_OVERRIDE to fix GCC -Wsuggest-override and Clang-tidy modernize-use-override warnings. 2020-05-03 20:29:19 -07:00
Andrey Semashev
112d6f0fbc Changed macro checks in the footer to match the header. 2020-05-02 18:50:08 +03:00
Andrey Semashev
1e92e84b80 Added checking for IP version in addresses in syslog backend.
The syslog sink backend now verifies the IP version of the local and target
addresses set by user. The addresses must have the same IP version as was
specified in the ip_version named parameter on the sink backend construction.
When an address is obtained as a result of host name resolution, only addresses
with matching IP version are considered.

This should protect against using local and target addresses with mismatching
IP versions, which results in errors on sending datagrams.

Fixes https://github.com/boostorg/log/issues/119.
2020-04-27 21:47:41 +03:00
Andrey Semashev
49af1c8fa0 Use SFINAE to limit attribute set iterator comparison, copy and assignment.
This makes the code more SFINAE-friendly. It also changes the converting
constructor and assignment operator to only work as converting constructor and
assignment and let the compiler generate the implicit copy constructor and
assignment operator. This should silence bogus clang-10 warnings about
deprecated generation of an implicit copy assignment operator in presence of
a copy constructor. (The warning is bogus because there already is an explicitly
defined assignment operator, which works as a copy assignment as well.)

Closes https://github.com/boostorg/log/issues/118.
boost-1.73.0
2020-04-20 20:30:17 +03:00
Andrey Semashev
c068c2a5aa Add explicit markup of fallthrough between switch/case labels.
Silences some compiler warnings.

Closes https://github.com/boostorg/log/issues/115.
2020-04-14 00:29:14 +03:00
Andrey Semashev
43b944da2e Added a workaround for MSVC 14.2 codegen bug in regex matching filters.
The compiler generates incorrect code causing a crash if it inlines the
`matches` generator functions, when a Boost.Regex regular expression is passed
as an argument.

https://developercommunity.visualstudio.com/content/problem/982738/bad-code-generated-in-boostlogboostregex-test-case.html

As a workaround we prohibit inlining these functions on this compiler.

Fixes AppVeyor CI test failures.
2020-04-08 15:32:33 +03:00
Andrey Semashev
ea0dd6171b Merge pull request #112 from Nekto89/filesystem_no_deprecated
Add missing filesystem includes.
boost-1.73.0.beta1
2020-04-03 21:54:57 +03:00
Marian Klymov
e6c6479d91 Add missing filesystem includes.
Fix compilation with BOOST_FILESYSTEM_NO_DEPRECATED
2020-04-03 18:55:34 +03:00
Andrey Semashev
2113f04d60 Minor tweak for README.md. 2020-03-10 22:34:34 +03:00
Andrey Semashev
cd71e1c7f5 Updated README.md with better representation of build status. 2020-03-10 22:32:29 +03:00
Andrey Semashev
5f48284bf9 Nonessential cleanup. 2020-03-04 13:38:45 +03:00
Andrey Semashev
68d38321b3 Updated deprecated uses of boost::bind to silence warnings. 2020-03-04 00:44:23 +03:00
Andrey Semashev
60cf554ee9 Ported to use newer API of Boost.Atomic. 2020-03-04 00:32:52 +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
a7b4a140d9 Use atomic to implement logging_enabled flag. 2020-02-29 16:01:00 +03:00
Andrey Semashev
9474c57264 Perform automatic flush in default sink.
Closes https://github.com/boostorg/log/issues/103.
2020-02-29 15:44:41 +03:00
Andrey Semashev
e5f305a8a5 Make core::flush call flush on the default sink.
When trivial logging is used and no sinks are registered, allow
users to manually flush the default sink.

Related to https://github.com/boostorg/log/issues/103.
2020-02-29 15:43:34 +03:00
Andrey Semashev
009adf94c0 Added a release note about fixing compilation in MSYS2 Cygwin. 2020-02-23 15:24:15 +03:00
Andrey Semashev
4d9ce5cdba Check for feature test macros after including config.hpp.
This avoids possible inconsistency when the BOOST_LOG_WITHOUT_DEBUG_OUTPUT
and BOOST_LOG_WITHOUT_EVENT_LOG macros are defined in config.hpp but not
in command line.

Related to https://github.com/boostorg/log/issues/102.
2020-02-21 18:44:48 +03:00
Andrey Semashev
2f15b44dc1 Converted some uses of Boost.MPL to Boost.TypeTraits. 2020-02-17 18:41:29 +03:00
Andrey Semashev
e7bcb0ac4b Converted some uses of Boost.MPL to Boost.TypeTraits. 2020-02-17 18:28:39 +03:00
Andrey Semashev
34d9e64815 Reordered day and day kind initializers to match declaration order.
Silences compiler warnings.
2020-02-17 15:54:45 +03:00
Andrey Semashev
c721453aeb Ported named_scope_list and pool_allocator to allocator_traits.
This fixes compilation problems with C++20 std::allocator, which removed
deprecated typedefs and member functions.

Closes https://github.com/boostorg/log/pull/100.
2020-02-17 15:49:58 +03:00
Andrey Semashev
8a7cc8efd6 Move log file status check before renaming to the target file name.
If the log file has not been created (e.g. when there are no log records
written yet), rotate_file could throw as it attempted to rename the file
to the target file name before rotation. The check for file presence that
was intended to protect from this was made later on, before the file collector
is invoked. This commit moves the check before renaming.
2020-02-17 15:12:36 +03:00
Andrey Semashev
42b4463ad2 Fixed day kind representation in rotation_at_time_point.
Since day_kind is enum, it may be represented by a signed integer type.
Some compilers (e.g. MSVC) use sign extension when loading the day kind
field from the bit field, which corrupts the monthday value (which is 2)
and makes the rotation never happen. Fix this by using an unsigned type
to store the day kind and then cast the value to the enum.

Also, rearranged the bitfields for slightly better codegen.

Fixes https://github.com/boostorg/log/issues/98.
2020-02-05 17:30:55 +03:00
Andrey Semashev
10a63204b3 Added a workaround for openlog not saving ident string.
Some syslog implementations (e.g. glibc) do not save the ident string
in openlog and instead only save a pointer to the user-provided string.
This requires the caller to preserve the passed string for the whole
duration of logging.

Fixes https://github.com/boostorg/log/issues/97.
2020-01-22 21:37:56 +03:00
Andrey Semashev
b395be29c2 Removed spaces before ticket/issue/PR links in docs, updated copyright years. 2019-12-12 11:53:26 +03:00
Andrey Semashev
3f3d93c2c5 Merge pull request #93 from boostorg/pr/source-location
Use throw_exception overload taking source_location
2019-11-27 20:01:06 +03:00
Peter Dimov
ac17f4adcf Add source_location #include 2019-11-27 18:47:10 +02:00
Peter Dimov
a519226b38 Use throw_exception overload taking source_location 2019-11-26 17:28:12 +02:00