2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-19 04:22:09 +00:00
Files
log/doc
Andrey Semashev 724e888b5a Only reuse the old counter if the file name pattern has a counter placeholder.
If text_file_backend is set up to append to a previously written file, and
the actively written file name pattern does not include a file counter
placeholder but the target file name pattern does, we used to skip incrementing
the file counter in an attempt to generate the same file name as was last used,
so that we open the last used file for appending. While it did result in
reusing the last written file, since the counter was not incremented, the next
rotation would generate the last used target file name, which would result in
overwriting the last rotated file instead of adding a new file to the storage.

To mitigate this, only skip incrementing the counter if the file name pattern
for the actively written file actually has a counter placeholder. This way,
the counter will get incremented in the case described above, and on rotation
a new target file name will be generated.

Fixes https://github.com/boostorg/log/issues/245.
2025-03-18 01:46:11 +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
2024-03-02 18:38:56 +03:00
2024-04-07 23:58:00 +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