From 7c7719e224bd7ed0bc92e049b1708c65ce82b57f Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Mon, 11 Nov 2019 21:50:29 +0100 Subject: [PATCH] log to console as argument --- README.md | 2 +- ffplayout.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7957e10e..79ea00b4 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ ffplayout also allows the passing of parameters: - `-c, --config` use given config file - `-d, --desktop` preview on desktop - `-f, --folder` use folder for playing -- `-l, --log` for user-defined log file +- `-l, --log` for user-defined log file, *none* for console output - `-i, --loop` loop playlist infinitely - `-p, --playlist` for playlist file - `-s, --start` set start time in *hh:mm:ss*, *now* for start with first' diff --git a/ffplayout.py b/ffplayout.py index 3999bacd..d5303547 100755 --- a/ffplayout.py +++ b/ffplayout.py @@ -311,7 +311,7 @@ console_handler = logging.StreamHandler() formatter = logging.Formatter('[%(asctime)s] [%(levelname)s] %(message)s') -if _log.to_file: +if _log.to_file and _log.path != 'none': file_handler = TimedRotatingFileHandler(_log.path, when='midnight', backupCount=5) file_handler.setFormatter(formatter)