mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
fix prettify logging formatter (fixes #692)
This commit is contained in:
parent
789b032d6f
commit
6e998e30e8
1 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue