]> git.e2factory.org Git - e2factory.git/commitdiff
add unoffical E2_TRACE env var, for debugging only
authorTobias Ulmer <tu@emlix.com>
Fri, 9 Oct 2015 17:16:17 +0000 (19:16 +0200)
committerTobias Ulmer <tu@emlix.com>
Fri, 9 Oct 2015 17:21:35 +0000 (19:21 +0200)
Not documented, may go away or change without notice

Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index eca58d40b5cea622201d078c58372529421958e5..eb231040960b8d35598f3ff52cb0ffddc704e4db 100644 (file)
@@ -131,7 +131,8 @@ end
 function e2lib.init()
     e2lib.log(4, "e2lib.init()")
     -- DEBUG: change to "cr" to log return from function
-    debug.sethook(e2lib.tracer, "c")
+    local traceflags = os.getenv("E2_TRACE") or "c"
+    debug.sethook(e2lib.tracer, traceflags)
 
     local rc, re = e2util.signal_reset()
     if not rc then