2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-19 04:22:09 +00:00
Files
Andrey Semashev 826df254f0 Fixed a long loop on file rotation if filename pattern did not include counter.
If the log file is configured for appending and rotation_size limit is set,
text_file_backend::consume would repeatedly attempt to reopen the log file with
a new counter value in attempt to find a file with a size below the
rotation_size limit. This logic breaks if the file name pattern does not
include a file counter placeholder, as it means the backend would repeatedly
attempt to open the same file, whose size would exceed the limit. The loop
would terminate after 2^32 iterations, but that may take a while.

Avoid this fallback if we know the file counter placeholder is missing
in the file name pattern.

Also, make fil size checks more robust against integer overflows.

Fixes https://github.com/boostorg/log/issues/252.
2025-11-06 00:59:55 +03:00
..
2022-08-28 23:40:06 +03:00
2013-04-13 12:30:25 +00:00
2013-04-13 12:30:25 +00:00
2024-03-02 16:01:59 +03:00
2022-08-28 23:40:06 +03:00
2014-01-19 16:04:31 +04:00
2014-01-19 16:44:26 +04:00
2022-08-28 23:40:06 +03:00
2022-08-28 23:40:06 +03:00
2022-08-29 00:23:44 +03:00