From fb31be9fc8600247dc029a72079c0f29e6a4256e Mon Sep 17 00:00:00 2001 From: bosd Date: Tue, 14 Mar 2023 20:00:15 +0100 Subject: [PATCH] Show invalid parser as error in the logger --- src/invoice2data/extract/invoice_template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/invoice2data/extract/invoice_template.py b/src/invoice2data/extract/invoice_template.py index c2779324..d929d9b1 100644 --- a/src/invoice2data/extract/invoice_template.py +++ b/src/invoice2data/extract/invoice_template.py @@ -223,11 +223,11 @@ def extract(self, optimized_str: str, invoice_file: str, input_module: str) -> O if value: output[k] = value else: - logger.error("Failed to parse field %s with parser %s", k, v["parser"]) + logger.warning("Failed to parse field %s with parser %s", k, v["parser"]) else: - logger.warning("Field %s has unknown parser %s set", k, v["parser"]) + logger.error("Field %s has unknown parser %s set", k, v["parser"]) else: - logger.warning("Field %s doesn't have parser specified", k) + logger.error("Field %s doesn't have parser specified", k) elif k.startswith("static_"): logger.debug("field=%s | static value=%s", k, v) output[k.replace("static_", "")] = v