mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +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
|
# Set log file to $CURDIR/log/pylink
|
||||||
logformat = logging.Formatter(_format)
|
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)
|
logfile.setFormatter(logformat)
|
||||||
|
|
||||||
global log
|
global log
|
||||||
|
Loading…
Reference in New Issue
Block a user