1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-08-03 19:08:37 +02:00

Change logger to display absolute source file path instead of relative path

This commit is contained in:
Yann 2016-06-01 13:55:53 +02:00
commit 468cf2a383

View file

@ -96,10 +96,7 @@ def remove_console_handlers():
def log(lvl, msg, *args, **kwargs):
caller = logger.findCaller() # Opti warning : small overhead
extra = {
'_pathname': os.path.relpath(
caller[0],
start=Settings.lib_path
), # os.path.relpath add another small overhead
'_pathname': os.path.abspath(caller[0]),
'_lineno': caller[1],
'_funcName': caller[2],
}