Skip to content

Commit cdb6ecc

Browse files
andrewsgbusunkim96
authored andcommitted
logging.warn -> logging.warning to fix "DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead"
1 parent 85a2efa commit cdb6ecc

File tree

1 file changed

+1
-1
lines changed
  • packages/google-cloud-logging/samples/snippets

1 file changed

+1
-1
lines changed

packages/google-cloud-logging/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)