Add info about max_files in the docstrings of hourly/daily file sinks (#3170)

This commit is contained in:
Rasmus 2024-09-09 15:54:03 +02:00 committed by GitHub
parent a3a0c9d663
commit 271f0f3b14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,9 @@ struct daily_filename_format_calculator {
* Rotating file sink based on date. * Rotating file sink based on date.
* If truncate != false , the created file will be truncated. * 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.
* 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> template <typename Mutex, typename FileNameCalc = daily_filename_calculator>
class daily_file_sink final : public base_sink<Mutex> { class daily_file_sink final : public base_sink<Mutex> {

View File

@ -39,6 +39,8 @@ struct hourly_filename_calculator {
* Rotating file sink based on time. * Rotating file sink based on time.
* If truncate != false , the created file will be truncated. * 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 = hourly_filename_calculator> template <typename Mutex, typename FileNameCalc = hourly_filename_calculator>
class hourly_file_sink final : public base_sink<Mutex> { class hourly_file_sink final : public base_sink<Mutex> {