Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite rotation files count #1905

Closed
reviewer301 opened this issue Apr 5, 2021 · 0 comments
Closed

Infinite rotation files count #1905

reviewer301 opened this issue Apr 5, 2021 · 0 comments

Comments

@reviewer301
Copy link

const size_t MaxLogFilesCount = std::numeric_limits<size_t>::max();
const size_t MaxLogFileSize = (5 * 1024 * 1024);
const std::string LoggerName("async_file_logger");
spdlog::rotating_logger_mt(LoggerName, logFile(), MaxLogFileSize, MaxLogFilesCount);

On rotation file logger check filenames from std::numeric_limits<size_t>::max() to zero.
this code in file rotating_file_sink-inl.h :

for (auto i = max_files_; i > 0; --i)
....
@gabime gabime closed this as completed in 4cea9b8 Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant