2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-19 04:22:09 +00:00
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
2013-04-13 12:30:25 +00:00
2024-02-07 00:01:09 +03:00

Boost.Log

Boost.Log, part of collection of the Boost C++ Libraries, provides tools for adding logging to libraries and applications.

Directories

  • build - Boost.Log build scripts
  • config - Boost.Log build configuration code and scripts
  • doc - QuickBook documentation sources
  • example - Boost.Log examples
  • include - Interface headers of Boost.Log
  • src - Compilable source code of Boost.Log
  • test - Boost.Log unit tests

More information

Build status

Branch GitHub Actions AppVeyor Test Matrix Dependencies
master GitHub Actions AppVeyor Tests Dependencies
develop GitHub Actions AppVeyor Tests Dependencies

License

Distributed under the Boost Software License, Version 1.0.

Description
Mirrored via gitea-mirror
Readme 3.9 MiB
Languages
C++ 99%
CMake 1%