Skip to content

Commit cda73a5

Browse files
yuji38kwmtvsajip
authored andcommitted
bpo-35781: Changed references to deprecated 'warn' method in logging documentation in favour of 'warning' (pythonGH-11654)
1 parent f0c7436 commit cda73a5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/howto/logging-cookbook.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ previous simple module-based configuration example::
186186
# 'application' code
187187
logger.debug('debug message')
188188
logger.info('info message')
189-
logger.warn('warn message')
189+
logger.warning('warn message')
190190
logger.error('error message')
191191
logger.critical('critical message')
192192

@@ -295,7 +295,7 @@ Here is an example of a module using the logging configuration server::
295295
while True:
296296
logger.debug('debug message')
297297
logger.info('info message')
298-
logger.warn('warn message')
298+
logger.warning('warn message')
299299
logger.error('error message')
300300
logger.critical('critical message')
301301
time.sleep(5)

Doc/howto/logging.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ logger, a console handler, and a simple formatter using Python code::
610610
# 'application' code
611611
logger.debug('debug message')
612612
logger.info('info message')
613-
logger.warn('warn message')
613+
logger.warning('warn message')
614614
logger.error('error message')
615615
logger.critical('critical message')
616616

@@ -640,7 +640,7 @@ the names of the objects::
640640
# 'application' code
641641
logger.debug('debug message')
642642
logger.info('info message')
643-
logger.warn('warn message')
643+
logger.warning('warn message')
644644
logger.error('error message')
645645
logger.critical('critical message')
646646

0 commit comments

Comments
 (0)