From 2e630ac3675c0b529d2179ddfa3a85e6bad4f0b4 Mon Sep 17 00:00:00 2001 From: Hai Joey Tran Date: Fri, 5 Apr 2024 15:50:20 -0400 Subject: [PATCH] Lower various logging statement levels to clean up example printing (#30782) * Lower various logging statement levels to clean up example printing * revert statecache log level change --- sdks/python/apache_beam/internal/gcp/auth.py | 4 ++-- .../runners/portability/fn_api_runner/translations.py | 3 --- .../runners/portability/fn_api_runner/worker_handlers.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sdks/python/apache_beam/internal/gcp/auth.py b/sdks/python/apache_beam/internal/gcp/auth.py index b2fda2c6e897..31bc0b88b8ef 100644 --- a/sdks/python/apache_beam/internal/gcp/auth.py +++ b/sdks/python/apache_beam/internal/gcp/auth.py @@ -131,9 +131,9 @@ def get_service_credentials(cls, pipeline_options): # apitools use urllib with the global timeout. Set it to 60 seconds # to prevent network related stuckness issues. if not socket.getdefaulttimeout(): - _LOGGER.info("Setting socket default timeout to 60 seconds.") + _LOGGER.debug("Setting socket default timeout to 60 seconds.") socket.setdefaulttimeout(60) - _LOGGER.info( + _LOGGER.debug( "socket default timeout is %s seconds.", socket.getdefaulttimeout()) cls._credentials = cls._get_service_credentials(pipeline_options) diff --git a/sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py b/sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py index 71f1400e783b..07af1c958cfd 100644 --- a/sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py +++ b/sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py @@ -761,10 +761,7 @@ def create_and_optimize_stages( # Apply each phase in order. for phase in phases: - _LOGGER.info('%s %s %s', '=' * 20, phase, '=' * 20) stages = list(phase(stages, pipeline_context)) - _LOGGER.debug('%s %s' % (len(stages), [len(s.transforms) for s in stages])) - _LOGGER.debug('Stages: %s', [str(s) for s in stages]) # Return the (possibly mutated) context and ordered set of stages. return pipeline_context, stages diff --git a/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py b/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py index 11c8ecd84f21..eb40ced2da08 100644 --- a/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py +++ b/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py @@ -919,7 +919,7 @@ def get_worker_handlers( self.state_servicer, self._job_provision_info.for_environment(environment), grpc_server) - _LOGGER.info( + _LOGGER.debug( "Created Worker handler %s for environment %s (%s, %r)", worker_handler, environment_id,