Skip to content

Commit

Permalink
Add info about max_files in the docstrings of hourly/daily file sinks (
Browse files Browse the repository at this point in the history
  • Loading branch information
themightyoarfish committed Sep 9, 2024
1 parent a3a0c9d commit 271f0f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/spdlog/sinks/daily_file_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ struct daily_filename_format_calculator {
* Rotating file sink based on date.
* If truncate != false , the created file will be truncated.
* If max_files > 0, retain only the last max_files and delete previous.
* If max_files > 0, retain only the last max_files and delete previous.
* Note that old log files from previous executions will not be deleted by this class,
* rotation and deletion is only applied while the program is running.
*/
template <typename Mutex, typename FileNameCalc = daily_filename_calculator>
class daily_file_sink final : public base_sink<Mutex> {
Expand Down
2 changes: 2 additions & 0 deletions include/spdlog/sinks/hourly_file_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ struct hourly_filename_calculator {
* Rotating file sink based on time.
* If truncate != false , the created file will be truncated.
* If max_files > 0, retain only the last max_files and delete previous.
* Note that old log files from previous executions will not be deleted by this class,
* rotation and deletion is only applied while the program is running.
*/
template <typename Mutex, typename FileNameCalc = hourly_filename_calculator>
class hourly_file_sink final : public base_sink<Mutex> {
Expand Down

0 comments on commit 271f0f3

Please sign in to comment.