From ad90d8d76be8f5a11c454ff658d2db8db370de4a Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Wed, 8 Mar 2023 00:04:27 -0800 Subject: [PATCH] hide remove files after for now --- docs/config.rst | 3 +++ src/ytdl_sub/config/config_validator.py | 28 ++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index b5902478..6862ba8b 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -42,6 +42,9 @@ should be persisted. persist_logs: logs_directory: "/path/to/log/directory" +Log files are stored as +``YYYY-mm-dd-HHMMSS.subscription_name.(success|error).log``. + .. autoclass:: ytdl_sub.config.config_validator.PersistLogsValidator() :members: :member-order: bysource diff --git a/src/ytdl_sub/config/config_validator.py b/src/ytdl_sub/config/config_validator.py index 123f982f..04510b30 100644 --- a/src/ytdl_sub/config/config_validator.py +++ b/src/ytdl_sub/config/config_validator.py @@ -54,20 +54,20 @@ class PersistLogsValidator(StrictDictValidator): return self._logs_directory.value # pylint: disable=line-too-long - @property - def keep_logs_after(self) -> Optional[str]: - """ - Optional. Keep logs after this date, in yt-dlp datetime format. - - .. code-block:: Markdown - - A string in the format YYYYMMDD or - (now|today|yesterday|date)[+-][0-9](microsecond|second|minute|hour|day|week|month|year)(s) - - For example, ``today-1week`` means keep 1 week's worth of logs. By default, ytdl-sub will - keep all log files. - """ - return self._keep_logs_after + # @property + # def keep_logs_after(self) -> Optional[str]: + # """ + # Optional. Keep logs after this date, in yt-dlp datetime format. + # + # .. code-block:: Markdown + # + # A string in the format YYYYMMDD or + # (now|today|yesterday|date)[+-][0-9](microsecond|second|minute|hour|day|week|month|year)(s) + # + # For example, ``today-1week`` means keep 1 week's worth of logs. By default, ytdl-sub will + # keep all log files. + # """ + # return self._keep_logs_after # pylint: enable=line-too-long