Skip to content

Commit

Permalink
fix prettify logging formatter (fixes #692)
Browse files Browse the repository at this point in the history
  • Loading branch information
pseewald committed Dec 18, 2019
1 parent 789b032 commit 6e998e3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tools/prettify/prettify.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ def prettifyFile(

if is_fypp(infile):
logger.warning(
"{}: fypp directives not fully supported, running only fprettify".format(
filename
)
"fypp directives not fully supported, running only fprettify",
extra={"ffilename": filename, "fline": 0},
)
replace = False
normalize_use = False
Expand Down Expand Up @@ -235,7 +234,8 @@ def prettifyFile(
)
except normalizeFortranFile.InputStreamError as exc:
logger.error(
"normalizeFortranFile could not parse file, file is not normalized"
"normalizeFortranFile could not parse file, file is not normalized",
extra={"ffilename": filename, "fline": 0},
)
outbuf.close()
inbuf.seek(0)
Expand All @@ -260,7 +260,9 @@ def prettifyFile(
hash_prev = hash_new

except:
logger.critical("error processing file '{}'".format(filename))
logger.critical(
"error processing file", extra={"ffilename": filename, "fline": 0}
)
raise

else:
Expand Down

0 comments on commit 6e998e3

Please sign in to comment.