Commit Graph

654 Commits

Author SHA1 Message Date
Andrey Semashev
8c4e805f6a Correct alignment attribute placement to fic compilation with clang 5.
The alignment attribute should come before the storage class specifier.
Otherwise the attribute relates to the type that is mentioned in the
declaration.

This should fix https://github.com/boostorg/log/issues/38.
2017-09-02 20:23:16 +03:00
Andrey Semashev
fa8ae61e25 Revert "Revert "Use BOOST_MAY_ALIAS from Boost.Config.""
This reverts commit 82de0b775b.
2017-08-26 15:12:40 +03:00
Andrey Semashev
82de0b775b Revert "Use BOOST_MAY_ALIAS from Boost.Config."
This reverts commit bd49400623.

This is a temporary revert until Boost.Config is merged to master.
2017-08-24 13:18:53 +03:00
Andrey Semashev
7f75487d0b Fixed bad file counter returned from scan_for_files in case of counter overflow.
If the target directory contained a file with counter value of UINT_MAX in its
name, scan_for_files would always return the counter value of 0, even if such
file also existed in the directory. This caused incorrectly named log files to
appear in the target directory on user's application restart.

Also made sure that the returned counter value is zero if the scanning method
is not scan_matching or the file name pattern does not include the counter
placeholder. The returned counter should not have been used by the caller
in these cases anyway, but the returned value used to be bogus.
2017-08-15 16:09:50 +03:00
Andrey Semashev
bd49400623 Use BOOST_MAY_ALIAS from Boost.Config. 2017-07-29 16:59:05 +03:00
Andrey Semashev
cdcd5839cd Updated .gitignore to match the new directory structure. 2017-07-07 03:07:43 +03:00
Andrey Semashev
50b7e5c6c5 Moved auto-generated doc files to a separate directory. Marked this directory so that it is not scanned by the inspect tool. 2017-07-07 03:04:34 +03:00
Andrey Semashev
bba0b77a18 Added workarounds for min/max macros to remove the warning from the inspect tool. 2017-07-07 01:57:38 +03:00
Andrey Semashev
d6d29f5f6c Exclude FreeBSD and other BSD systems from defining _XOPEN_SOURCE since Boost.ASIO fails to compile otherwise. 2017-07-01 22:03:52 +03:00
Andrey Semashev
87037a75cd Added a workaround for clang 3.1 failing to generate a defaulted constexpr constructor for record_view. 2017-07-01 00:41:49 +03:00
Andrey Semashev
a73ed3ef38 Updated library build scripts to unify system macros configuration for different platforms. In particular, this should improve compatibility with Solaris. It also avoids duplicating system macros in different places. 2017-06-30 23:42:45 +03:00
Andrey Semashev
6e2632c804 Silenced MSVC warning about a narrowing conversion. 2017-03-25 20:44:32 +03:00
Andrey Semashev
e02a776830 Merge pull request #35 from danieljames/fix-images
Add dependency on copied images
2017-01-14 02:00:31 +03:00
Daniel James
efec5a69db Add dependency on copied images 2017-01-13 21:47:58 +00:00
Andrey Semashev
e7ef3a099b Updated copyright years. 2017-01-12 13:02:44 +03:00
Andrey Semashev
ba8b049304 Corrected error messages in exceptions on unsupported filter relation. 2016-12-06 01:51:58 +03:00
Andrey Semashev
68701167a1 Updated comments, renamed auto_flush parameter for clarity. 2016-11-27 23:10:34 +03:00
Andrey Semashev
4c51383370 Corrected comment. 2016-11-27 23:00:30 +03:00
Andrey Semashev
38fd663541 Added a way to disable log file rotation on sink destruction.
This can be useful when the final rotation cannot be performed while global destructors are run (e.g. when a close handler depends on a global state).

It can also be useful to implement file appending with collector set up to a different target directory than the directory the backend writes to.
2016-11-27 22:53:32 +03:00
Andrey Semashev
f75d1be7ba Nonessential. 2016-11-10 19:51:15 +03:00
Andrey Semashev
299603ff02 Fixed auto-detection of native syslog API.
The auto-detection was removed in 1.62, which resulted in UDP socket-based implementation being always used. The new auto-detection verifies the presence of syslog.h and all required components it provides.

Fixes ticket #12600.
2016-11-10 19:46:52 +03:00
Andrey Semashev
6cf6aa2917 Corrected a comment. 2016-11-07 11:26:41 +03:00
Andrey Semashev
d0dfd2a619 Added an explicit cast to size_t to avoid warnings on 32-bit targets. 2016-11-06 19:47:24 +03:00
Andrey Semashev
b93d4bebd5 Merge pull request #33 from wordaligned/fix/syslog-date-format
According to RFC3164, the day of month field in the timestamp should be formatted as two characters
2016-10-28 02:30:16 +04:00
tag
d595b6de33 According to RFC3164, the day of month field in the timestamp should be formatted as two characters:
"If the day of the month is less
     than 10, then it MUST be represented as a space and then the
     number.  For example, the 7th day of August would be
     represented as "Aug  7", with two spaces between the "g" and
     the "7".

The printf formatter "%2d" does this. "% 2d" will prepend an unwanted space, e.g.

     printf("Aug % 2d\n", 27) => Aug  27
2016-10-27 22:58:11 +01:00
Andrey Semashev
adb7bcf05d Removed the previously deprecated type_info_wrapper. 2016-10-16 17:47:15 +03:00
Andrey Semashev
a74e9d4a74 Added the get_current_file_name method to obtain the current log file
name from the text file sink backend.

Also make sure the close handler is not called when the file is not
open.
2016-10-16 17:37:14 +03:00
Andrey Semashev
084f848d14 Removed an extra space before the month that violated RFC3164. 2016-10-16 15:47:16 +03:00
Andrey Semashev
6933295c09 Merge branch 'develop' 2016-10-13 16:00:28 +03:00
Rene Rivera
a5d1da4281 Add, and update, documentation build targets. 2016-10-10 11:39:50 -05:00
Andrey Semashev
ea486c1468 Take scalar types and enums by value in streaming operators.
This allows to output static constants and bitfields directly into
formatting stream and record stream. Fixes ticket #11998.
2016-10-08 22:27:34 +03:00
Rene Rivera
de7a2c42cf Add, and update, documentation build targets. 2016-10-07 23:07:34 -05:00
Andrey Semashev
7e76b87987 Updated links to gcc bugs related to LTO. 2016-10-04 21:36:04 +03:00
Andrey Semashev
416ff8541b Removed the note about LTO being fixed in gcc 5.1 because it's not fixed. 2016-10-04 19:38:12 +03:00
Andrey Semashev
76ef9e00c2 Disabled the getpwuid_r workaround for CrystaX NDK as apparently it provides the function. 2016-09-30 03:04:31 +03:00
Andrey Semashev
291a7d9509 Added a changelog entry about fixing compilation for Android. 2016-09-30 02:29:28 +03:00
Andrey Semashev
d13e6cbc41 Another workaround for Android - for missing getpwuid_r. 2016-09-30 02:12:19 +03:00
Andrey Semashev
93a063ca52 Attempt to work around build failures for Android because of a missing libc wrapper for getsid(). 2016-09-30 01:14:31 +03:00
Andrey Semashev
caa81d4c25 Added a check for natively supported 32-bit atomic ops. If not supported, exclude IPC facilities from build. 2016-09-15 15:37:19 +03:00
Andrey Semashev
17d945d6ff Corrected a typo in a comment. 2016-09-15 15:15:15 +03:00
Andrey Semashev
91314c7dc4 Added a workaround for MinGW32 not providing the ANSI C version of swprintf. Use the same workaround as for MSVC. 2016-09-09 19:27:50 +03:00
Andrey Semashev
461b6a1762 Added a workaround for systems with 32-bit size_t so that the amount of shift does not exceed the size of the size argument. Clears some warnings from gcc. 2016-09-09 19:25:17 +03:00
Andrey Semashev
b9944648e7 Added a few workarounds for gcc 4.6 in C++11 mode. 2016-09-09 18:01:30 +03:00
Andrey Semashev
2f80598e08 Added a delimiter space between the header marker and Boost.Log image.
The space is formally required by the Markdown syntax (http://spec.commonmark.org/0.25/#atx-headings), although GitHub implementation seems to not require it.
2016-08-19 13:34:44 +03:00
Andrey Semashev
3655c652ef Corrected inline code formatting. 2016-08-18 23:44:24 +03:00
Andrey Semashev
aa7bb31c99 Removed the dependency on Boost.Operators. Mark some of the interface functions with constexpr, where possible. 2016-08-10 01:53:34 +03:00
Andrey Semashev
2d6ea3dfc0 Removed unused typedef. 2016-08-10 01:35:59 +03:00
Andrey Semashev
896596bf9d Removed internal typedefs from the Doxygen output. 2016-08-10 00:49:15 +03:00
Andrey Semashev
c1e1112575 Added documentation for the max_size_decor decorator. Corrected a few mistakes in the examples. 2016-08-10 00:43:21 +03:00
Andrey Semashev
2dc0954e48 Disabled MSVC warning about using this in base initializer list. 2016-08-09 13:50:03 +03:00