Skip to content

Commit

Permalink
Use f-string for log messages
Browse files Browse the repository at this point in the history
As suggested by @catileptic
  • Loading branch information
tillprochaska committed Nov 21, 2023
1 parent 6f3a99d commit 80a18ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ingestors/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def ingest(self, file_path, entity, **kwargs):
try:
ingestor_class = self.auction(file_path, entity)
ingestor_name = ingestor_class.__name__
log.info("Ingestor [%r]: %s", entity, ingestor_name)
log.info(f"Ingestor [{repr(entity)}]: {ingestor_name}")

start_time = default_timer()
self.delegate(ingestor_class, file_path, entity)
Expand All @@ -213,7 +213,7 @@ def ingest(self, file_path, entity, **kwargs):

entity.set("processingStatus", self.STATUS_SUCCESS)
except ProcessingException as pexc:
log.exception("[%r] Failed to process: %s", entity, pexc)
log.exception(f"[{repr(entity)}] Failed to process: {pexc}")

if ingestor_name:
INGESTIONS_FAILED.labels(ingestor=ingestor_name).inc()
Expand Down

0 comments on commit 80a18ab

Please sign in to comment.