diff options
Diffstat (limited to 'scripts/automation/trex_control_plane/server/CCustomLogger.py')
-rwxr-xr-x | scripts/automation/trex_control_plane/server/CCustomLogger.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/server/CCustomLogger.py b/scripts/automation/trex_control_plane/server/CCustomLogger.py index ecf7d519..a8823cea 100755 --- a/scripts/automation/trex_control_plane/server/CCustomLogger.py +++ b/scripts/automation/trex_control_plane/server/CCustomLogger.py @@ -31,6 +31,10 @@ def setup_custom_logger(name, log_path = None): def setup_daemon_logger (name, log_path = None):
# first make sure path availabe
+ 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',
|