From df50bcae4ae3f45ea51cc321aeeca4bc2ae5fbc4 Mon Sep 17 00:00:00 2001 From: Andrew Gorcester Date: Mon, 29 Oct 2018 15:31:49 -0700 Subject: [PATCH] Fix deprecation warning logging.warn -> logging.warning to fix "DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead" --- logging/cloud-client/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging/cloud-client/handler.py b/logging/cloud-client/handler.py index 9986eab8593..7b4e50f217a 100644 --- a/logging/cloud-client/handler.py +++ b/logging/cloud-client/handler.py @@ -36,7 +36,7 @@ def use_logging_handler(): text = 'Hello, world!' # Emits the data using the standard logging module - logging.warn(text) + logging.warning(text) # [END logging_handler_usage] print('Logged: {}'.format(text))