added optional date to log file

This commit is contained in:
Pablo Yaniz 2022-12-22 20:34:50 -06:00
parent d3a2a4df41
commit c57facbdc2
2 changed files with 9 additions and 1 deletions

View file

@ -108,6 +108,11 @@ def load_config():
# Parse the keys from the logging group
config["log_to_file"] = config_logging.get("log_to_file", True)
config["logfile"] = config_logging.get("logfile", "/var/log/jellyfin/rffmpeg.log")
config["logfiledated"] = config_logging.get("logfiledated", False)
if config["logfiledated"] is True:
config["logfile"] = config_logging.get("logfile", "/var/log/jellyfin/"+ (datetime.today()).strftime('%Y%m%d') +"_rffmpeg.log")
else:
config["logfile"] = config_logging.get("logfile", "/var/log/jellyfin/rffmpeg.log")
config["logdebug"] = config_logging.get("debug", False)
# Parse the keys from the state group

View file

@ -15,7 +15,10 @@ rffmpeg:
# Log messages to this file.
# Ensure the user running rffmpeg can write to this directory.
#logfile: "/var/log/jellyfin/rffmpeg.log"
# You can add the date to the logfile if you prefer to have one file per day.
#logfiledated: false
# Show debugging messages
#debug: false