Skip to content

Commit

Permalink
Add web3_log_level setting (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise authored Feb 15, 2024
1 parent dfff5c6 commit 1cbf436
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ def setup_logging():

# Logging config does not affect messages issued by `warnings` module
warnings.simplefilter('ignore')

logging.getLogger('web3').setLevel(settings.web3_log_level)
5 changes: 5 additions & 0 deletions src/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ class Settings(metaclass=Singleton):
hot_wallet_password_file: Path
max_fee_per_gas_gwei: int
database: Path

log_level: str
log_format: str
web3_log_level: str

ipfs_fetch_endpoints: list[str]
ipfs_timeout: int
ipfs_retry_timeout: int
Expand Down Expand Up @@ -146,6 +149,8 @@ def set(

self.log_level = log_level or 'INFO'
self.log_format = log_format or LOG_PLAIN
self.web3_log_level = decouple_config('WEB3_LOG_LEVEL', default='INFO')

self.sentry_dsn = decouple_config('SENTRY_DSN', default='')

self.ipfs_fetch_endpoints = decouple_config(
Expand Down

0 comments on commit 1cbf436

Please sign in to comment.