Skip to content

Commit 5262931

Browse files
andrewsgbusunkim96
authored andcommitted
Fix deprecation warning [(#1801)](GoogleCloudPlatform/python-docs-samples#1801)
logging.warn -> logging.warning to fix "DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead"
1 parent 12bf3da commit 5262931

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/snippets/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def use_logging_handler():
3636
text = 'Hello, world!'
3737

3838
# Emits the data using the standard logging module
39-
logging.warn(text)
39+
logging.warning(text)
4040
# [END logging_handler_usage]
4141

4242
print('Logged: {}'.format(text))

0 commit comments

Comments
 (0)