diff options
author | Lidi Zheng <lidiz@google.com> | 2018-11-28 11:05:09 -0800 |
---|---|---|
committer | Lidi Zheng <lidiz@google.com> | 2018-11-30 09:56:40 -0800 |
commit | 5fc0547a94ce125e952a1782c4691e3902892ed4 (patch) | |
tree | d3ee86a5a8a5873460fdad3d689463bccb00be64 /examples/python/helloworld | |
parent | a93b6012cc1ae0259118ba5bb4eff4c8634bd18c (diff) |
Add basicConfig to prepare to log future exception
Diffstat (limited to 'examples/python/helloworld')
4 files changed, 8 insertions, 0 deletions
diff --git a/examples/python/helloworld/greeter_client.py b/examples/python/helloworld/greeter_client.py index 24b49ac233..ee2032a9e6 100644 --- a/examples/python/helloworld/greeter_client.py +++ b/examples/python/helloworld/greeter_client.py @@ -14,6 +14,7 @@ """The Python implementation of the GRPC helloworld.Greeter client.""" from __future__ import print_function +import logging import grpc @@ -32,4 +33,5 @@ def run(): if __name__ == '__main__': + logging.basicConfig() run() diff --git a/examples/python/helloworld/greeter_client_with_options.py b/examples/python/helloworld/greeter_client_with_options.py index 7eda8c9066..d15871b519 100644 --- a/examples/python/helloworld/greeter_client_with_options.py +++ b/examples/python/helloworld/greeter_client_with_options.py @@ -14,6 +14,7 @@ """The Python implementation of the GRPC helloworld.Greeter client with channel options and call timeout parameters.""" from __future__ import print_function +import logging import grpc @@ -41,4 +42,5 @@ def run(): if __name__ == '__main__': + logging.basicConfig() run() diff --git a/examples/python/helloworld/greeter_server.py b/examples/python/helloworld/greeter_server.py index c355662ef8..e3b4f2c1ff 100644 --- a/examples/python/helloworld/greeter_server.py +++ b/examples/python/helloworld/greeter_server.py @@ -15,6 +15,7 @@ from concurrent import futures import time +import logging import grpc @@ -43,4 +44,5 @@ def serve(): if __name__ == '__main__': + logging.basicConfig() serve() diff --git a/examples/python/helloworld/greeter_server_with_reflection.py b/examples/python/helloworld/greeter_server_with_reflection.py index 5ba8782dfc..5acedbcb71 100644 --- a/examples/python/helloworld/greeter_server_with_reflection.py +++ b/examples/python/helloworld/greeter_server_with_reflection.py @@ -15,6 +15,7 @@ from concurrent import futures import time +import logging import grpc from grpc_reflection.v1alpha import reflection @@ -49,4 +50,5 @@ def serve(): if __name__ == '__main__': + logging.basicConfig() serve() |