File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
packages/service-library/src/servicelib/rabbitmq/rpc_interfaces/catalog
services/catalog/src/simcore_service_catalog Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1- """ RPC client-side for the RPC server at the payments service
2-
3- """
1+ """RPC client-side for the RPC server at the payments service"""
42
53import logging
64from typing import Any , cast
2523_logger = logging .getLogger (__name__ )
2624
2725
28- @log_decorator (_logger , level = logging .DEBUG )
2926async def list_services_paginated ( # pylint: disable=too-many-arguments
3027 rpc_client : RabbitMQRPCClient ,
3128 * ,
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ async def _wrapper(app: FastAPI, **kwargs):
5252
5353
5454@router .expose (reraise_if_error_type = (CatalogForbiddenError ,))
55- @log_decorator (_logger , level = logging .DEBUG )
5655@_profile_rpc_call
5756async def list_services_paginated (
5857 app : FastAPI ,
Original file line number Diff line number Diff line change 2323
2424_logger = logging .getLogger (__name__ )
2525
26+ _LOG_LEVEL_STEP = logging .CRITICAL - logging .ERROR
27+ _NOISY_LOGGERS = (
28+ "aio_pika" ,
29+ "aiobotocore" ,
30+ "aiormq" ,
31+ "botocore" ,
32+ "httpcore" ,
33+ "werkzeug" ,
34+ )
35+
2636
2737def create_app (settings : ApplicationSettings | None = None ) -> FastAPI :
38+ # keep mostly quiet noisy loggers
39+ quiet_level : int = max (
40+ min (logging .root .level + _LOG_LEVEL_STEP , logging .CRITICAL ), logging .WARNING
41+ )
42+ for name in _NOISY_LOGGERS :
43+ logging .getLogger (name ).setLevel (quiet_level )
44+
2845 if settings is None :
2946 settings = ApplicationSettings .create_from_envs ()
3047
You can’t perform that action at this time.
0 commit comments