mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-12 08:12:27 -05:00
suppress warnings
This commit is contained in:
@@ -196,8 +196,11 @@ def get_s3_files():
|
|||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
f"job_cache length before regen: {len(job_cache)} #notify-admin-1200"
|
f"job_cache length before regen: {len(job_cache)} #notify-admin-1200"
|
||||||
)
|
)
|
||||||
with ThreadPoolExecutor() as executor:
|
try:
|
||||||
executor.map(lambda key: read_s3_file(bucket_name, key, s3res), object_keys)
|
with ThreadPoolExecutor() as executor:
|
||||||
|
executor.map(lambda key: read_s3_file(bucket_name, key, s3res), object_keys)
|
||||||
|
except Exception:
|
||||||
|
current_app.logger.exception("Connection pool issue")
|
||||||
|
|
||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
f"job_cache length after regen: {len(job_cache)} #notify-admin-1200"
|
f"job_cache length after regen: {len(job_cache)} #notify-admin-1200"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ AWS_CLIENT_CONFIG = Config(
|
|||||||
"addressing_style": "virtual",
|
"addressing_style": "virtual",
|
||||||
},
|
},
|
||||||
use_fips_endpoint=True,
|
use_fips_endpoint=True,
|
||||||
|
max_pool_connections=50,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,12 @@ def init_app(app):
|
|||||||
for logger_instance, handler in product(warning_loggers, handlers):
|
for logger_instance, handler in product(warning_loggers, handlers):
|
||||||
logger_instance.addHandler(handler)
|
logger_instance.addHandler(handler)
|
||||||
logger_instance.setLevel(logging.WARNING)
|
logger_instance.setLevel(logging.WARNING)
|
||||||
|
|
||||||
|
# Suppress specific loggers to prevent leaking sensitive info
|
||||||
|
logging.getLogger("boto3").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("botocore").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("urllib3").setLevel(logging.ERROR)
|
||||||
|
|
||||||
app.logger.info("Logging configured")
|
app.logger.info("Logging configured")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user