From: Yaroslav Brustinov Date: Tue, 13 Sep 2016 17:23:19 +0000 (+0300) Subject: typo X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=904639a3ec6ec6ced04d220d13c97cf9fbd8f266;p=trex.git typo --- diff --git a/scripts/automation/trex_control_plane/server/CCustomLogger.py b/scripts/automation/trex_control_plane/server/CCustomLogger.py index fd9a32ad..551b0239 100755 --- a/scripts/automation/trex_control_plane/server/CCustomLogger.py +++ b/scripts/automation/trex_control_plane/server/CCustomLogger.py @@ -10,7 +10,8 @@ def prepare_dir(log_path): def setup_custom_logger(name, log_path = None): # first make sure path availabe - prepare_dir(log_path) + if log_path: + prepare_dir(log_path) logging.basicConfig(level = logging.INFO, format = '%(asctime)s %(name)-10s %(module)-20s %(levelname)-8s %(message)s', datefmt = '%m-%d %H:%M') @@ -30,11 +31,12 @@ def setup_custom_logger(name, log_path = None): def setup_daemon_logger (name, log_path = None): # first make sure path availabe - prepare_dir(log_path) - try: - os.unlink(log_path) - except: - pass + if log_path: + prepare_dir(log_path) + try: + os.unlink(log_path) + except: + pass logging.basicConfig(level = logging.INFO, format = '%(asctime)s %(name)-10s %(module)-20s %(levelname)-8s %(message)s', datefmt = '%m-%d %H:%M',