Commit afdd936e authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN

fix: fix log output issue if a similar file from another user already exists

parent 41e8a4f7
......@@ -19,7 +19,7 @@ import numpy as np
import multiprocessing
import pkg_resources as pkgr
import matplotlib.artist as art
import tempfile
from Bio.PDB import Select
LOG = logging.getLogger(__name__)
......@@ -507,6 +507,12 @@ class CustomLogging(object):
# with open(self.default_file, 'rt') as f:
conf = pkgr.resource_stream(__name__, self.default_file).read().decode()
config = json.loads(conf)
for handler in config["handlers"]:
if config["handlers"][handler].get("filename"):
path_elts = os.path.split(config["handlers"][handler]["filename"])
config["handlers"][handler]["filename"] = "".join(
path_elts[:-1]) + "/" + os.path.split(tempfile.mktemp())[1] + "_" + \
return config
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment