diff --git a/tools/gen_json.py b/tools/gen_json.py index 5475f67..ad6aa30 100644 --- a/tools/gen_json.py +++ b/tools/gen_json.py @@ -11,10 +11,11 @@ config.read("tools.cfg") ORIGPATH = Path(config["tools"]["kres_orig"]) INPATH = Path(config["tools"]["kres_srl"]) OUTPATH = Path(config["tools"]["kres_json"]) -LOGFILE = Path(config["tools"]["logfile"]) DEBUG = config["tools"]["debug"] == "True" +LOGFILE = Path(config["tools"]["logfile"]).absolute().resolve() + +logging.basicConfig(filename=str(LOGFILE), level=logging.INFO) -logging.basicConfig(filename=LOGFILE, level=logging.INFO) def get_origfile(filename): for origfile in ORIGPATH.iterdir(): diff --git a/tools/parse_all.py b/tools/parse_all.py index 1218b67..82f414b 100644 --- a/tools/parse_all.py +++ b/tools/parse_all.py @@ -16,9 +16,9 @@ config = configparser.ConfigParser() config.read("tools.cfg") INDIR = Path(config["tools"]["kres_orig"]) OUTDIR = Path(config["tools"]["kres_tsv"]) -LOGFILE = Path(config["tools"]["logfile"]) +LOGFILE = Path(config["tools"]["logfile"]).absolute().resolve() -logging.basicConfig(filename=LOGFILE, level=logging.INFO) +logging.basicConfig(filename=str(LOGFILE), level=logging.INFO) """ print("parsing ssj") diff --git a/tools/tools.cfg b/tools/tools.cfg index d684723..6ae9dab 100644 --- a/tools/tools.cfg +++ b/tools/tools.cfg @@ -3,5 +3,5 @@ kres_orig = /kres_mount/kres_parsed/tei kres_tsv = ../data/kres_out/1_tsv kres_srl = ../data/kres_out/_srl kres_json = ../data/kres_out/final_json -logfile = "../progress.log" +logfile = ../progress.log debug = False