Change log format
This commit is contained in:
parent
28dab8512c
commit
f1b93805ff
@ -40,14 +40,13 @@ log_path = path.expanduser(AppConfig.MAIN_CFG.get_or("path_log", "~/.cache/cpdct
|
||||
makedirs(path.dirname(log_path), exist_ok=True)
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s [%(levelname)s] %(message)s",
|
||||
format="%(asctime)s [%(levelname)s] [%(name)s] %(message)s",
|
||||
handlers=[
|
||||
logging.FileHandler(log_path),
|
||||
logging.StreamHandler()
|
||||
]
|
||||
)
|
||||
log = logging.getLogger(__name__)
|
||||
log.critical("Test")
|
||||
|
||||
# This is taken from:
|
||||
# https://timlehr.com/2018/01/python-exception-hooks-with-qt-message-box/index.html
|
||||
@ -94,4 +93,4 @@ class UncaughtHook(QtCore.QObject):
|
||||
self._exception_caught.emit(log_msg)
|
||||
|
||||
# create a global instance of our class to register the hook
|
||||
qt_exception_hook = UncaughtHook()
|
||||
# qt_exception_hook = UncaughtHook()
|
||||
|
Loading…
x
Reference in New Issue
Block a user