diff options
author | Naresh <ghostwriternr@gmail.com> | 2018-08-17 12:24:58 +0000 |
---|---|---|
committer | Naresh <ghostwriternr@gmail.com> | 2018-08-17 12:24:58 +0000 |
commit | a20e2073c1c53cbdd81a4fb750982a0b13e0c24e (patch) | |
tree | d7501b2580665a426caae2e29e05beb179cc711d /src/python/grpcio/grpc/_common.py | |
parent | 0a1d0d25a2392a0fa70d8ad54c572bdc726b62d3 (diff) |
Configure module level loggers with basicConfig()
Module level loggers were introduced to gRPC Python in 06e1683, but
missed configuring these, leading to 'No handler found for module'
errors. Using the root logger implicitly calls basicConfig() which does
the basic configuration for the logging system by creating a
StreamHandler with a default Formatter and adding it to the logger. But
this is not the case for module level loggers.
Fix this issue by explicitly calling logging.basicConfig().
Diffstat (limited to 'src/python/grpcio/grpc/_common.py')
-rw-r--r-- | src/python/grpcio/grpc/_common.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/python/grpcio/grpc/_common.py b/src/python/grpcio/grpc/_common.py index 8358cbec5b..3805c7e82a 100644 --- a/src/python/grpcio/grpc/_common.py +++ b/src/python/grpcio/grpc/_common.py @@ -20,6 +20,7 @@ import six import grpc from grpc._cython import cygrpc +logging.basicConfig() _LOGGER = logging.getLogger(__name__) CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY = { |