Browse Source

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

Yann Weber 8 years ago
parent
commit
468cf2a383
1 changed files with 1 additions and 4 deletions
  1. 1
    4
      lodel/logger.py

+ 1
- 4
lodel/logger.py View File

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

Loading…
Cancel
Save