hide remove files after for now

This commit is contained in:
Jesse Bannon 2023-03-08 00:04:27 -08:00
parent bb5adb3471
commit ad90d8d76b
2 changed files with 17 additions and 14 deletions

View file

@ -42,6 +42,9 @@ should be persisted.
persist_logs: persist_logs:
logs_directory: "/path/to/log/directory" 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() .. autoclass:: ytdl_sub.config.config_validator.PersistLogsValidator()
:members: :members:
:member-order: bysource :member-order: bysource

View file

@ -54,20 +54,20 @@ class PersistLogsValidator(StrictDictValidator):
return self._logs_directory.value return self._logs_directory.value
# pylint: disable=line-too-long # pylint: disable=line-too-long
@property # @property
def keep_logs_after(self) -> Optional[str]: # def keep_logs_after(self) -> Optional[str]:
""" # """
Optional. Keep logs after this date, in yt-dlp datetime format. # Optional. Keep logs after this date, in yt-dlp datetime format.
#
.. code-block:: Markdown # .. code-block:: Markdown
#
A string in the format YYYYMMDD or # A string in the format YYYYMMDD or
(now|today|yesterday|date)[+-][0-9](microsecond|second|minute|hour|day|week|month|year)(s) # (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 # For example, ``today-1week`` means keep 1 week's worth of logs. By default, ytdl-sub will
keep all log files. # keep all log files.
""" # """
return self._keep_logs_after # return self._keep_logs_after
# pylint: enable=line-too-long # pylint: enable=line-too-long