Implement logging strategy (#444)

* Logging strategy and convert all prints() to logging invocations
This commit is contained in:
cybermaggedon 2025-07-30 23:18:38 +01:00 committed by GitHub
parent 3e0651222b
commit dd70aade11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
117 changed files with 1216 additions and 667 deletions

View file

@ -8,10 +8,14 @@ import base64
import os
import argparse
import time
import logging
from .... direct.cassandra import TrustGraph
from .... base import TriplesStoreService
# Module logger
logger = logging.getLogger(__name__)
default_ident = "triples-write"
default_graph_host='localhost'
@ -61,7 +65,7 @@ class Processor(TriplesStoreService):
table=message.metadata.collection,
)
except Exception as e:
print("Exception", e, flush=True)
logger.error(f"Exception: {e}", exc_info=True)
time.sleep(1)
raise e