3
0
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:
James Lu 2015-07-19 16:48:04 -07:00
parent 57e9bf601e
commit fbc2fbf595

2
log.py
View File

@ -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