Skip to content

Commit 271f0f3

Browse files
Add info about max_files in the docstrings of hourly/daily file sinks (#3170)
1 parent a3a0c9d commit 271f0f3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/spdlog/sinks/daily_file_sink.h

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ struct daily_filename_format_calculator {
6262
* Rotating file sink based on date.
6363
* If truncate != false , the created file will be truncated.
6464
* If max_files > 0, retain only the last max_files and delete previous.
65+
* If max_files > 0, retain only the last max_files and delete previous.
66+
* Note that old log files from previous executions will not be deleted by this class,
67+
* rotation and deletion is only applied while the program is running.
6568
*/
6669
template <typename Mutex, typename FileNameCalc = daily_filename_calculator>
6770
class daily_file_sink final : public base_sink<Mutex> {

include/spdlog/sinks/hourly_file_sink.h

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ struct hourly_filename_calculator {
3939
* Rotating file sink based on time.
4040
* If truncate != false , the created file will be truncated.
4141
* If max_files > 0, retain only the last max_files and delete previous.
42+
* Note that old log files from previous executions will not be deleted by this class,
43+
* rotation and deletion is only applied while the program is running.
4244
*/
4345
template <typename Mutex, typename FileNameCalc = hourly_filename_calculator>
4446
class hourly_file_sink final : public base_sink<Mutex> {

0 commit comments

Comments
 (0)