Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Dec 20, 2023
1 parent 36e6065 commit 8e4e480
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/graphsenselib/ingest/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,11 @@ def print_block_info(
) -> None:
"""Display information about number of synced/ingested blocks."""

logger.warning(f"Last synced block: {last_synced_block:,}")
logger.info(f"Last synced block: {last_synced_block:,}")
if last_ingested_block is None:
logger.warning("Last ingested block: None")
logger.info("Last ingested block: None")
else:
logger.warning(f"Last ingested block: {last_ingested_block:,}")
logger.info(f"Last ingested block: {last_ingested_block:,}")


def get_connection_from_url(provider_uri: str, provider_timeout=600):
Expand Down
2 changes: 1 addition & 1 deletion src/graphsenselib/ingest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

INGEST_SINKS = ["parquet", "cassandra"]

CASSANDRA_INGEST_DEFAULT_CONCURRENCY = 1000
CASSANDRA_INGEST_DEFAULT_CONCURRENCY = 100

logger = logging.getLogger(__name__)

Expand Down
2 changes: 2 additions & 0 deletions src/graphsenselib/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ def configure_logging(loglevel):
logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.ERROR)
logging.getLogger("ProgressLogger").setLevel(logging.ERROR)
logging.getLogger("BatchWorkExecutor").setLevel(logging.DEBUG)
else:
logging.getLogger("cassandra").setLevel(logging.WARNING)
logging.getLogger("ethereumetl").setLevel(logging.WARNING)
logging.getLogger("Cluster").setLevel(logging.ERROR)
logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.ERROR)
logging.getLogger("ProgressLogger").setLevel(logging.ERROR)
logging.getLogger("BatchWorkExecutor").setLevel(logging.ERROR)


class IndentLogger(logging.LoggerAdapter):
Expand Down

0 comments on commit 8e4e480

Please sign in to comment.