Closed shmilylty closed 4 years ago
It was decided after discussions that the severity of a level should not be changed. You can remove no=5
, no=10
and no=40
for levels "TRACE"
, "DEBUG"
and "ERROR"
and it will work fine.
Maybe I could update Loguru so that if the no
is equal to the already configured severity, it does not raise an exception.
Maybe I could update Loguru so that if the no is equal to the already configured severity, it does not raise an exception.
@Delgan is that on the roadmap?
is that on the roadmap?
I'm not sure. I think the intent is wrong anyway.
Users should not provide any no
value when updating an existing level. It helps catching the problem earlier, rather than silently ignoring an invalid usage.
In particular, it prevents the user from facing an unexpected error later on just because he changed the no
value in the logger configuration.
It would be surprising that logger.level("TRACE", no=5)
works but not logger.level("TRACE", no=6)
.
loguru 0.5.0
my code: https://github.com/shmilylty/OneForAll/blob/master/config/log.py#L26