]> git.e2factory.org Git - e2factory.git/commitdiff
e2tool: open debug.log after loading e2.conf
authorTobias Ulmer <tu@emlix.com>
Mon, 19 Nov 2018 17:00:41 +0000 (18:00 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 10 Dec 2018 17:00:11 +0000 (18:00 +0100)
Makes debug.log respect config.log.logrotate.
Closes bz#236.

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

index c669a67281741e4b299f9c2672f849e408645ffc..dd52843624b5ceffc14f653c045d4df378f00259 100644 (file)
@@ -797,14 +797,16 @@ function e2tool.e2project_class:load_project(skip_load_config)
         e2lib.abort(re)
     end
 
-    rc, re = opendebuglogfile()
+    -- load e2.conf and do basic initialization
+    rc, re = e2lib.init2()
     if not rc then
-        return false, e:cat(re)
+        return false, re
     end
 
-    rc, re = e2lib.init2() -- configuration must be available
+    -- open debug.log after config.log.logrotate has come into effect
+    rc, re = opendebuglogfile()
     if not rc then
-        return false, re
+        return false, e:cat(re)
     end
 
     if skip_load_config == true then