Closed
Description
When using the Logger.log()
method with a level number, the log message is generated with Level [number]
rather than the name of the severity level. This is different to the behaviour of the builtin logging library and not what I would expect from looking at the implementation.
from loguru import logger
logger.log(10, 'Test message')
logger.log('DEBUG', 'Test message')
print(logger.level('DEBUG'))
I would expect the output of both log messages to show "DEBUG" as the log severity.
Python 3.10.2
Loguru 0.7.0