aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc/_cython/_cygrpc
diff options
context:
space:
mode:
authorGravatar Richard Belleville <rbellevi@google.com>2018-10-30 18:16:53 -0700
committerGravatar Richard Belleville <rbellevi@google.com>2018-10-30 18:16:53 -0700
commit839722adc50ca6b2759805e30c6b8a4556652ff5 (patch)
treeac7a54e7735233960859f9124495d1655fb58ccb /src/python/grpcio/grpc/_cython/_cygrpc
parent1e05d48d2deac8486c9552a384a14848db09d558 (diff)
Add NullHandler to avoid warnings about no handler
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc')
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi1
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
index 00a1b23a67..fa356d913e 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
@@ -15,6 +15,7 @@
import logging
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
# This function will ascii encode unicode string inputs if neccesary.
# In Python3, unicode strings are the default str type.
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
index ce701724fd..f9d1e863ca 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
@@ -19,6 +19,7 @@ import time
import grpc
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
cdef class Server: