diff --git a/subiquitycore/log.py b/subiquitycore/log.py index dfdfe689..fc8cb44e 100644 --- a/subiquitycore/log.py +++ b/subiquitycore/log.py @@ -28,7 +28,7 @@ def setup_logger(dir, base='subiquity'): for level in 'info', 'debug': nopid_file = os.path.join(dir, "{}-{}.log".format(base, level)) logfile = "{}.{}".format(nopid_file, os.getpid()) - handler = logging.FileHandler(logfile, mode='w') + handler = logging.FileHandler(logfile) # os.symlink cannot replace an existing file or symlink so create # it and then rename it over. tmplink = logfile + ".link"