mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
log: replace existing log files instead of appending
This commit is contained in:
parent
57e9bf601e
commit
fbc2fbf595
2
log.py
2
log.py
@ -21,7 +21,7 @@ logging.basicConfig(level=level, format=_format)
|
||||
|
||||
# Set log file to $CURDIR/log/pylink
|
||||
logformat = logging.Formatter(_format)
|
||||
logfile = logging.FileHandler(os.path.join(logdir, 'pylink.log'))
|
||||
logfile = logging.FileHandler(os.path.join(logdir, 'pylink.log'), mode='w')
|
||||
logfile.setFormatter(logformat)
|
||||
|
||||
global log
|
||||
|
Loading…
Reference in New Issue
Block a user