loguru 0.5.0
Traceback (most recent call last):
File "D:/Tools/PenetrationTesting/2.Intelligence_Gathering/domain/OneForAll/oneforall.py", line 15, in <module>
import dbexport
File "D:\Tools\PenetrationTesting\2.Intelligence_Gathering\domain\OneForAll\dbexport.py", line 13, in <module>
from common import utils
File "D:\Tools\PenetrationTesting\2.Intelligence_Gathering\domain\OneForAll\common\utils.py", line 21, in <module>
from config.log import logger
File "D:\Tools\PenetrationTesting\2.Intelligence_Gathering\domain\OneForAll\config\log.py", line 26, in <module>
logger.level(name='TRACE', no=5, color='<cyan><bold>', icon='鉁忥笍')
File "C:\Users\pentest\.virtualenvs\OneForAll-4zkd7hGI\lib\site-packages\loguru\_logger.py", line 1516, in level
raise TypeError("Level '%s' already exists, you can't update its severity no" % name)
TypeError: Level 'TRACE' already exists, you can't update its severity no
my code:
https://github.com/shmilylty/OneForAll/blob/master/config/log.py#L26
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.
Most helpful comment
It was decided after discussions that the severity of a level should not be changed. You can remove
no=5,no=10andno=40for levels"TRACE","DEBUG"and"ERROR"and it will work fine.Maybe I could update Loguru so that if the
nois equal to the already configured severity, it does not raise an exception.