]> git.e2factory.org Git - e2factory.git/commitdiff
use e2lib.logf()
authorTobias Ulmer <tu@emlix.com>
Tue, 15 Jan 2013 12:38:17 +0000 (13:38 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:13 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/tools.lua

index 5102f4aa46aff56a1765ad158ff5715e063ef479..c9589cb7d4db8864b59cbaaae4fc609cf6929027 100644 (file)
@@ -103,8 +103,8 @@ function tools.set_tool(name, value, flags)
     if type(flags) == "string" then
         toollist[name].flags = flags
     end
-    e2lib.log(3, string.format("setting tool: %s=%s flags=%s",
-    name, toollist[name].name, toollist[name].flags))
+    e2lib.logf(3, "setting tool: %s=%s flags=%s", name, toollist[name].name,
+        toollist[name].flags)
     return true, nil
 end
 
@@ -135,8 +135,8 @@ function tools.add_tool(name, value, flags, optional)
     }
 
     local t = toollist[name]
-    e2lib.log(3, string.format("adding tool: %s=%s flags=%s optional=%s",
-    name, t.name, t.flags, tostring(t.optional)))
+    e2lib.logf(3, "adding tool: %s=%s flags=%s optional=%s", name, t.name,
+        t.flags, tostring(t.optional))
 
     return true, nil
 end
@@ -153,14 +153,12 @@ function tools.check_tool(name)
         tool.path = p:read()
         p:close()
         if not tool.path then
-            e2lib.log(3, string.format(
-            "tool not available: %s", tool.name))
+            e2lib.logf(3, "tool not available: %s", tool.name)
             return false, "tool not available"
         end
     end
-    e2lib.log(4, string.format(
-    "tool available: %s (%s)",
-    tool.name, tool.path))
+    e2lib.logf(4, "tool available: %s (%s)", tool.name, tool.path)
+
     return true
 end
 
@@ -176,9 +174,7 @@ function tools.init()
                 error = true
                 warn = "Error"
             end
-            e2lib.log(1, string.format(
-            "%s: tool is not available: %s",
-            warn, tool))
+            e2lib.logf(1, "%s: tool is not available: %s", warn, tool)
         end
     end
     if error then