koaning / calmcode-feedback

A repo to collect issues with calmcode.io
16 stars 0 forks source link

In logging vidoes: CRITICAL should be above ERROR #138

Closed Stannislav closed 2 years ago

Stannislav commented 2 years ago

In the video and the code example on https://calmcode.io/logging/level.html the order of the logging levels is wrong

it should be

logger.debug('this is a debug statement')
logger.info('this is a info statement')
logger.warning('this is a warning statement')
logger.error('this is a error statement')
logger.critical('this is a critical statement')

I swapped the last two lines: CRITICAL is more critical than ERROR. Source: https://docs.python.org/3/library/logging.html#logging-levels

koaning commented 2 years ago

Well spotted! It's on the todo.

koaning commented 2 years ago

Done.