diff --git a/src/common/logging.py b/src/common/logging.py index 85d1ffd0..13e2328c 100644 --- a/src/common/logging.py +++ b/src/common/logging.py @@ -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) diff --git a/src/config/settings.py b/src/config/settings.py index 28f53214..a3e6adfd 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -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 @@ -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(