aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc
diff options
context:
space:
mode:
authorGravatar Richard Belleville <gnossen@gmail.com>2018-11-01 16:11:28 -0700
committerGravatar GitHub <noreply@github.com>2018-11-01 16:11:28 -0700
commitb741454fe45e1a868ff967c557be9caddc3a569a (patch)
tree10c7a23deb3eb461ee9a5190e1f09dc951da6400 /src/python/grpcio/grpc
parentf091ba1b66f356abf6c89507e98940f448269215 (diff)
parent18cc5f5dbe7247b46cb2f13ede5f9e5d0f50dfad (diff)
Merge pull request #17064 from gnossen/fix-logging
Fix logging
Diffstat (limited to 'src/python/grpcio/grpc')
-rw-r--r--src/python/grpcio/grpc/_channel.py2
-rw-r--r--src/python/grpcio/grpc/_common.py2
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi2
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi2
-rw-r--r--src/python/grpcio/grpc/_plugin_wrapping.py2
-rw-r--r--src/python/grpcio/grpc/_server.py1
-rw-r--r--src/python/grpcio/grpc/framework/foundation/callable_util.py2
-rw-r--r--src/python/grpcio/grpc/framework/foundation/logging_pool.py2
-rw-r--r--src/python/grpcio/grpc/framework/foundation/stream_util.py2
9 files changed, 8 insertions, 9 deletions
diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py
index c85ff06ada..734eac3801 100644
--- a/src/python/grpcio/grpc/_channel.py
+++ b/src/python/grpcio/grpc/_channel.py
@@ -24,8 +24,8 @@ from grpc import _grpcio_metadata
from grpc._cython import cygrpc
from grpc.framework.foundation import callable_util
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
_USER_AGENT = 'grpc-python/{}'.format(_grpcio_metadata.__version__)
diff --git a/src/python/grpcio/grpc/_common.py b/src/python/grpcio/grpc/_common.py
index 3805c7e82a..d35f4566bd 100644
--- a/src/python/grpcio/grpc/_common.py
+++ b/src/python/grpcio/grpc/_common.py
@@ -20,8 +20,8 @@ import six
import grpc
from grpc._cython import cygrpc
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY = {
cygrpc.ConnectivityState.idle:
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 334e561baa..fa356d913e 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
@@ -14,8 +14,8 @@
import logging
-logging.basicConfig()
_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 5779437b92..f9d1e863ca 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
@@ -18,8 +18,8 @@ import logging
import time
import grpc
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
cdef class Server:
diff --git a/src/python/grpcio/grpc/_plugin_wrapping.py b/src/python/grpcio/grpc/_plugin_wrapping.py
index 88ab4d8371..53af2ff913 100644
--- a/src/python/grpcio/grpc/_plugin_wrapping.py
+++ b/src/python/grpcio/grpc/_plugin_wrapping.py
@@ -20,8 +20,8 @@ import grpc
from grpc import _common
from grpc._cython import cygrpc
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
class _AuthMetadataContext(
diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py
index daa000a6e1..7276a7fd90 100644
--- a/src/python/grpcio/grpc/_server.py
+++ b/src/python/grpcio/grpc/_server.py
@@ -27,7 +27,6 @@ from grpc import _interceptor
from grpc._cython import cygrpc
from grpc.framework.foundation import callable_util
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
_SHUTDOWN_TAG = 'shutdown'
diff --git a/src/python/grpcio/grpc/framework/foundation/callable_util.py b/src/python/grpcio/grpc/framework/foundation/callable_util.py
index fb8d5f7c1e..36066e19df 100644
--- a/src/python/grpcio/grpc/framework/foundation/callable_util.py
+++ b/src/python/grpcio/grpc/framework/foundation/callable_util.py
@@ -21,8 +21,8 @@ import logging
import six
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
class Outcome(six.with_metaclass(abc.ABCMeta)):
diff --git a/src/python/grpcio/grpc/framework/foundation/logging_pool.py b/src/python/grpcio/grpc/framework/foundation/logging_pool.py
index 7702d1785f..dfb8dbdc30 100644
--- a/src/python/grpcio/grpc/framework/foundation/logging_pool.py
+++ b/src/python/grpcio/grpc/framework/foundation/logging_pool.py
@@ -17,8 +17,8 @@ import logging
from concurrent import futures
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
def _wrap(behavior):
diff --git a/src/python/grpcio/grpc/framework/foundation/stream_util.py b/src/python/grpcio/grpc/framework/foundation/stream_util.py
index 9184f95873..e03130cced 100644
--- a/src/python/grpcio/grpc/framework/foundation/stream_util.py
+++ b/src/python/grpcio/grpc/framework/foundation/stream_util.py
@@ -19,8 +19,8 @@ import threading
from grpc.framework.foundation import stream
_NO_VALUE = object()
-logging.basicConfig()
_LOGGER = logging.getLogger(__name__)
+_LOGGER.addHandler(logging.NullHandler())
class TransformingConsumer(stream.Consumer):