From 93d4b652fe8713fc79cb7ed287bc66b3ebf3e7cd Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Thu, 24 Sep 2020 10:43:00 +0200 Subject: [PATCH] getLogger per method --- ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py b/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py index 9722f8b..c713bd6 100644 --- a/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py +++ b/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py @@ -22,7 +22,6 @@ from shapely.geometry import Polygon from .config import OCRD_TOOL TOOL = 'ocrd-repair-inconsistencies' -LOG = getLogger('processor.RepairInconsistencies') class RepairInconsistencies(Processor): @@ -32,6 +31,7 @@ class RepairInconsistencies(Processor): super(RepairInconsistencies, self).__init__(*args, **kwargs) def process(self): + LOG = getLogger('processor.RepairInconsistencies') assert_file_grp_cardinality(self.input_file_grp, 1) assert_file_grp_cardinality(self.output_file_grp, 1) @@ -118,6 +118,7 @@ class RepairInconsistencies(Processor): def get_text(thing, joiner=''): """Get the text of the given thing, joining if necessary""" + LOG = getLogger('processor.RepairInconsistencies') def _get_text_for_one(one): try: @@ -135,6 +136,7 @@ def get_text(thing, joiner=''): def _fix_segment(segment, page_id, reverse=False): """Fix order of child elements of (region/line/word) segment.""" + LOG = getLogger('processor.RepairInconsistencies') if isinstance(segment, TextRegionType): joiner = '\n'