From 5034e3bd7cc2537b3d6b103e052cdf20d5e06dba Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 11 Apr 2013 18:50:15 +0200 Subject: [PATCH] Format and remove log messages Signed-off-by: Tobias Ulmer --- generic/e2lib.lua | 30 ++++++++++++++---------------- generic/err.lua | 2 +- generic/generic_git.lua | 17 +++-------------- generic/transport.lua | 6 +----- local/e2-fetch-sources.lua | 18 +++++++----------- local/e2build.lua | 30 ++++++++++-------------------- local/e2tool.lua | 34 +++++++++++----------------------- local/files.lua | 17 +++++++---------- local/git.lua | 6 ++---- 9 files changed, 56 insertions(+), 104 deletions(-) diff --git a/generic/e2lib.lua b/generic/e2lib.lua index eb23104..3a25892 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -247,8 +247,7 @@ function e2lib.init2() local ssh = nil ssh = e2lib.globals.osenv["E2_SSH"] if ssh then - e2lib.log(3, string.format( - "using ssh command from the E2_SSH environment variable: %s", ssh)) + e2lib.logf(3, "using E2_SSH environment variable: %s", ssh) tools.set_tool("ssh", ssh) end @@ -329,7 +328,7 @@ function e2lib.tracer(event, line) out = out .. ")" e2lib.log(4, out) else - e2lib.log(4, string.format("< %s%s", module, ftbl.name)) + e2lib.logf(4, "< %s%s", module, ftbl.name) end end @@ -588,7 +587,7 @@ end function e2lib.cleanup() local rc, re = plugin.exit_plugins() if not rc then - e2lib.logf(1, "deinitializing plugins failed (ignoring)") + e2lib.log(1, "deinitializing plugins failed (ignoring)") end e2lib.rmtempdirs() e2lib.rmtempfiles() @@ -785,10 +784,10 @@ function e2lib.read_global_config(e2_config_file) c.config = function(x) c.data = x end - e2lib.log(4, string.format("reading global config file: %s", path)) + e2lib.logf(4, "reading global config file: %s", path) local rc = e2util.exists(path) if rc then - e2lib.log(3, string.format("using global config file: %s", path)) + e2lib.logf(3, "using global config file: %s", path) local rc, e = e2lib.dofile_protected(path, c, true) if not rc then return nil, e @@ -800,8 +799,7 @@ function e2lib.read_global_config(e2_config_file) e2lib.use_global_config() return true, nil else - e2lib.log(4, string.format( - "global config file does not exist: %s", path)) + e2lib.logf(4, "global config file does not exist: %s", path) end end return false, "no config file available" @@ -963,7 +961,7 @@ function e2lib.callcmd_redirect(cmd, out) if not devnull then e2lib.abort("could not open /dev/null") end - e2lib.log(3, "+ " .. cmd) + e2lib.logf(3, "+ %s", cmd) pid = e2util.fork() if pid == 0 then rc = e2lib.callcmd(devnull, out, out, cmd) @@ -1001,7 +999,7 @@ function e2lib.callcmd_pipe(cmds, infile, outfile) else o = outfile or ew end - e2lib.log(3, "+ " .. cmds[n]) + e2lib.logf(3, "+ %s", cmds[n]) local pid = e2util.fork() if pid == 0 then if n < c then fr:close() end @@ -1079,7 +1077,7 @@ function e2lib.callcmd_capture(cmd, capture) if not devnull then e2lib.abort("could not open /dev/null") end - e2lib.log(4, "+ " .. cmd) + e2lib.logf(4, "+ %s", cmd) pid = e2util.fork() if pid == 0 then oread:close() @@ -1304,7 +1302,7 @@ function e2lib.parse_e2versionfile(filename) filename) v.tag = match() or e2lib.abort("invalid tag name `", l, "' in e2 version file ", filename) - e2lib.log(3, "using e2 branch " .. v.branch .. " tag " .. v.tag) + e2lib.logf(3, "using e2 branch %s tag %s", v.branch, v.tag) return v end @@ -1331,7 +1329,7 @@ function e2lib.mktempfile(template) mktemp:close() -- register tmp for removing with rmtempfiles() later on table.insert(e2lib.globals.tmpfiles, tmp) - e2lib.log(4, string.format("creating temporary file: %s", tmp)) + e2lib.logf(4, "creating temporary file: %s", tmp) return tmp end @@ -1343,7 +1341,7 @@ function e2lib.rmtempfile(tmpfile) for i,v in ipairs(e2lib.globals.tmpfiles) do if v == tmpfile then table.remove(e2lib.globals.tmpfiles, i) - e2lib.log(4, string.format("removing temporary file: %s", tmpfile)) + e2lib.logf(4, "removing temporary file: %s", tmpfile) e2lib.rm(tmpfile, "-f") end end @@ -1372,7 +1370,7 @@ function e2lib.mktempdir(template) mktemp:close() -- register tmpdir for removing with rmtempdirs() later on table.insert(e2lib.globals.tmpdirs, tmpdir) - e2lib.log(4, string.format("creating temporary directory: %s", tmpdir)) + e2lib.logf(4, "creating temporary directory: %s", tmpdir) return tmpdir end @@ -1384,7 +1382,7 @@ function e2lib.rmtempdir(tmpdir) for i,v in ipairs(e2lib.globals.tmpdirs) do if v == tmpdir then table.remove(e2lib.globals.tmpdirs, i) - e2lib.log(4, string.format("removing temporary directory: %s", tmpdir)) + e2lib.logf(4, "removing temporary directory: %s", tmpdir) e2lib.rm(tmpdir, "-fr") end end diff --git a/generic/err.lua b/generic/err.lua index 4bb0b2d..6af9785 100644 --- a/generic/err.lua +++ b/generic/err.lua @@ -70,7 +70,7 @@ function err.print(e, depth) for k,m in ipairs(e.msg) do if type(m) == "string" then - e2lib.log(1, string.format("%s%s", prefix, m)) + e2lib.logf(1, "%s%s", prefix, m) prefix = string.format(" [%d]: ", depth) else -- it's a sub error diff --git a/generic/generic_git.lua b/generic/generic_git.lua index fdd25ed..166e50f 100644 --- a/generic/generic_git.lua +++ b/generic/generic_git.lua @@ -110,7 +110,7 @@ end -- @return bool -- @return an error object on failure function generic_git.git_checkout1(gitwc, branch) - e2lib.log(3, string.format("checking out branch: %s", branch)) + e2lib.logf(3, "checking out branch: %s", branch) -- git checkout local cmd = string.format("cd %s && git checkout %s", e2lib.shquote(gitwc), e2lib.shquote(branch)) @@ -127,8 +127,6 @@ end -- @return string: the commit id matching the ref parameter, or nil on error -- @return an error object on failure function generic_git.git_rev_list1(gitdir, ref) - e2lib.log(4, string.format("git_rev_list(): %s %s", - tostring(gitdir), tostring(ref))) local e = err.new("git rev-list failed") local rc, re local tmpfile = e2lib.mktempfile() @@ -148,9 +146,9 @@ function generic_git.git_rev_list1(gitdir, ref) return nil, err.new("can't parse git rev-list output") end if rev then - e2lib.log(4, string.format("git_rev_list: %s", rev)) + e2lib.logf(4, "git_rev_list: %s", rev) else - e2lib.log(4, string.format("git_rev_list: unknown ref: %s", ref)) + e2lib.logf(4, "git_rev_list: unknown ref: %s", ref) end return rev, nil end @@ -257,9 +255,6 @@ function generic_git.git_remote_add1(lurl, rurl, name) end function generic_git.git_remote_add(c, lserver, llocation, name, rserver, rlocation) - e2lib.log(4, string.format("%s, %s, %s, %s, %s, %s", - tostring(c), tostring(lserver), tostring(llocation), - tostring(name), tostring(rserver), tostring(rlocation))) local rurl, e = cache.remote_url(c, rserver, rlocation) if not rurl then e2lib.abort(e) @@ -280,7 +275,6 @@ end -- @return string: the git url -- @return an error object on failure function generic_git.git_url1(u) - e2lib.log(4, string.format("git_url(%s)", tostring(u))) local giturl if u.transport == "ssh" or u.transport == "scp" or u.transport == "rsync+ssh" then @@ -418,8 +412,6 @@ end -- @return bool, or nil on error -- @return an error object on failure function generic_git.verify_remote_tag(gitdir, tag) - e2lib.logf(4, "generic_git.verify_remote_tag(%s, %s)", tostring(gitdir), - tostring(tag)) local e = err.new("verifying remote tag") local rc, re @@ -469,7 +461,6 @@ end -- @return bool, or nil on error -- @return an error object on failure function generic_git.verify_clean_repository(gitwc) - e2lib.logf(4, "generic_git.verify_clean_repository(%s)", tostring(gitwc)) gitwc = gitwc or "." local e = err.new("verifying that repository is clean") local rc, re @@ -539,8 +530,6 @@ end -- @return bool, or nil on error -- @return an error object on failure function generic_git.verify_head_match_tag(gitwc, verify_tag) - e2lib.logf(4, "generic_git.verify_head_match_tag(%s, %s)", tostring(gitwc), - tostring(verify_tag)) assert(verify_tag) gitwc = gitwc or "." local e = err.new("verifying that HEAD matches 'refs/tags/%s'", verify_tag) diff --git a/generic/transport.lua b/generic/transport.lua index 7639006..6ca6d9c 100644 --- a/generic/transport.lua +++ b/generic/transport.lua @@ -144,8 +144,6 @@ end -- @return true on success, false on error -- @return an error object on failure function transport.fetch_file(surl, location, destdir, destname) - e2lib.log(4, string.format("%s: %s %s %s", "fetch_file()", surl, - location, destdir)) if not destname then destname = e2lib.basename(location) end @@ -288,7 +286,7 @@ function transport.push_file(sourcefile, durl, location, push_permissions, try_h if rc then done = true else - e2lib.logf(4, "Creating hardlink failed. ".. + e2lib.log(4, "Creating hardlink failed. ".. "Falling back to copying.") end end @@ -365,8 +363,6 @@ end -- @return true on success, false on error -- @return nil, an error string on error function transport.file_path(surl, location) - e2lib.log(4, string.format("%s: %s %s", "file_path()", surl, - location)) local e = err.new("can't get path to file") local u, re = url.parse(surl) if not u then diff --git a/local/e2-fetch-sources.lua b/local/e2-fetch-sources.lua index f589a1f..84da5d1 100644 --- a/local/e2-fetch-sources.lua +++ b/local/e2-fetch-sources.lua @@ -133,13 +133,12 @@ local function fetch_sources(info, opts, sel) local wc_avail = scm.working_copy_available(info, s.name) if opts.fetch and sel[s.name] then if wc_avail then - e2lib.log(1, "working copy for " .. s.name .. " is already available") + e2lib.logf(1, + "working copy for %s is already available", s.name) else - e2lib.log(1, "fetching working copy for source " .. s.name) + e2lib.logf(1, "fetching working copy for source %s", s.name) local rc, re = scm.fetch_source(info, s.name) if not rc then - e2lib.log(4, string.format("fetching source failed: %s", - s.name)) e:cat(re) end end @@ -152,14 +151,11 @@ local function fetch_sources(info, opts, sel) local wc_avail = scm.working_copy_available(info, s.name) if opts.update and has_wc and sel[s.name] then if not wc_avail then - e2lib.log(1, string.format("working copy for %s is not available", - s.name)) + e2lib.logf(1, "working copy for %s is not available", s.name) else - e2lib.log(1, "updating working copy for " .. s.name) + e2lib.logf(1, "updating working copy for %s", s.name) local rc, re = scm.update(info, s.name) if not rc then - e2lib.log(4, string.format("updating working copy failed: %s", - s.name)) e:cat(re) end end @@ -178,10 +174,10 @@ local sel = {} -- selected sources if #arguments > 0 then for _, x in pairs(arguments) do if info.sources[x] and not opts.result then - e2lib.log(3, "is regarded as source: " .. x) + e2lib.logf(3, "is regarded as source: %s", x) sel[x] = x elseif info.results[x] and opts.result then - e2lib.log(3, "is regarded as result: " .. x) + e2lib.logf(3, "is regarded as result: %s", x) local res = info.results[x] for _, s in ipairs(res.sources) do sel[s] = s diff --git a/local/e2build.lua b/local/e2build.lua index 037e37d..3806580 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -88,7 +88,6 @@ end -- @return bool -- @return an error object on failure local function result_available(info, r, return_flags) - e2lib.log(4, string.format("result_available(%s)", tostring(r))) local res = info.results[r] local mode = res.build_mode local buildid = e2tool.buildid(info, r) @@ -178,8 +177,6 @@ end -- @return bool -- @return an error object on failure function e2build.build_config(info, r) - e2lib.log(4, string.format("build_config(%s, %s)", - tostring(info), tostring(r))) local e = err.new("setting up build configuration for result `%s' failed", r) local res = info.results[r] @@ -236,7 +233,7 @@ function e2build.build_config(info, r) e2lib.logf(4, "build config for result %s: ", r) for k,v in pairs(tab) do v = tostring(v) - e2lib.log(4, string.format("\t%-10s = %s", k, v)) + e2lib.logf(4, "\t%-10s = %s", k, v) end tab.groups = {} for _,g in ipairs(res.chroot) do @@ -336,7 +333,7 @@ function e2build.enter_playground(info, r, chroot_command) local res = info.results[r] local rc, re local e = err.new("entering playground") - e2lib.log(4, "entering playground for " .. r .. " ...") + e2lib.logf(4, "entering playground for %s ...", r) local term = e2lib.globals.terminal local e2_su = tools.get_tool("e2-su-2.2") local cmd = string.format("%s %s chroot_2_3 %s %s", @@ -390,7 +387,7 @@ local function runbuild(info, r, return_flags) local res = info.results[r] local rc, re local e = err.new("build failed") - e2lib.log(3, "building " .. r .. " ...") + e2lib.logf(3, "building %s ...", r) local runbuild = string.format("/bin/bash -e -x %s/%s/%s", e2lib.shquote(res.build_config.Tc), e2lib.shquote(res.build_config.scriptdir), @@ -488,8 +485,7 @@ function e2build.unpack_result(info, r, dep, destdir) local dep_set = d.build_mode.dep_set(buildid) local server, location = d.build_mode.storage(info.project_location, info.release_id) - e2lib.log(3, string.format("searching for dependency %s in %s:%s", - dep, server, location)) + e2lib.logf(3, "searching for dependency %s in %s:%s", dep, server, location) local location1 = string.format("%s/%s/%s/result.tar", location, dep, dep_set) local cache_flags = {} @@ -547,7 +543,6 @@ end -- @return bool -- @return an error object on failure local function write_build_driver(info, r, destdir) - e2lib.log(4, "writing build driver") local res = info.results[r] local rc, re local e = err.new("generating build driver script failed") @@ -729,7 +724,6 @@ local function sources(info, r, return_flags) local res = info.results[r] local rc, re local e = err.new("installing build time dependencies") - e2lib.log(3, string.format("install_build_time_dependencies")) local deps deps = e2tool.get_depends(info, r) for i, dep in pairs(deps) do @@ -802,11 +796,11 @@ local function deploy(info, r, return_flags) --]] local res = info.results[r] if not res.build_mode.deploy then - e2lib.logf(4, "deployment disabled for this build mode") + e2lib.log(4, "deployment disabled for this build mode") return true end if not res._deploy then - e2lib.logf(4, "deployment disabled for this result") + e2lib.log(4, "deployment disabled for this result") return true end local files = {} @@ -850,12 +844,9 @@ end -- @return bool -- @return an error object on failure local function store_result(info, r, return_flags) - e2lib.logf(4, 'e2_build.store_result(%s, "%s", %s', tostring(info), r, - tostring(return_flags)) local res = info.results[r] local rc, re local e = err.new("fetching build results from chroot") - e2lib.log(4, string.format("store_result")) -- create a temporary directory to build up the result local tmpdir = e2lib.mktempdir() @@ -959,7 +950,6 @@ local function build_result(info, result, return_flags) e2lib.logf(3, "building result: %s", result) local res = info.results[result] for _,f in ipairs(build_process) do - -- e2lib.logf(3, "running function: %s", f.name) local t1 = os.time() local flags = {} local rc, re = f.func(info, result, flags) @@ -1051,7 +1041,7 @@ local function collect_project(info, r, return_flags) e2lib.mkdir(destdir, "-p") local init_files = e2util.directory(info.root .. "/proj/init") for _,f in ipairs(init_files) do - e2lib.log(3, string.format("init file: %s", f)) + e2lib.logf(3, "init file: %s", f) local server = "." local location = string.format("proj/init/%s", f) local cache_flags = {} @@ -1083,7 +1073,7 @@ local function collect_project(info, r, return_flags) -- generate build driver file for each result -- project/chroot// for _,g in pairs(res.collect_project_chroot_groups) do - e2lib.log(3, string.format("chroot group: %s", g)) + e2lib.logf(3, "chroot group: %s", g) local grp = info.chroot.groups_byname[g] local destdir = string.format("%s/project/chroot/%s", res.build_config.T, g) @@ -1154,7 +1144,7 @@ local function collect_project(info, r, return_flags) end -- project/results// for _,n in ipairs(res.collect_project_results) do - e2lib.log(3, string.format("result: %s", n)) + e2lib.logf(3, "result: %s", n) local rn = info.results[n] rc, re = e2build.build_config(info, n) if not rc then @@ -1214,7 +1204,7 @@ local function collect_project(info, r, return_flags) end for _,s in ipairs(info.results[r].collect_project_sources) do local src = info.sources[s] - e2lib.log(3, string.format("source: %s", s)) + e2lib.logf(3, "source: %s", s) local destdir = string.format("%s/project/%s", res.build_config.T, e2tool.sourcedir(s)) e2lib.mkdir(destdir, "-p") diff --git a/local/e2tool.lua b/local/e2tool.lua index 16b7fbe..85d5ce4 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -277,7 +277,7 @@ end local function load_user_config(info, path, dest, index, var) local rc, re local e = err.new("loading configuration failed") - e2lib.log(3, "loading " .. path) + e2lib.logf(3, "loading %s", path) if not e2util.exists(path) then return false, e:append("file does not exist: %s", path) end @@ -1372,7 +1372,7 @@ function e2tool.collect_project_info(info, skip_load_config) info.project_location_config) end info.project_location = l - e2lib.log(4, string.format("project location is %s", info.project_location)) + e2lib.logf(4, "project location is %s", info.project_location) -- read global interface version and check if this version of the local -- tools supports the version used for the project @@ -1838,8 +1838,6 @@ end -- @return bool true if verify succeeds, false otherwise -- @return nil, an error string on error function e2tool.verify_hash(info, server, location, sha1) - e2lib.logf(4, "verify_hash %s %s %s %s", tostring(info), tostring(server), - tostring(location), tostring(sha1)) local rc, re local e = err.new("error verifying checksum") local is_sha1, re = hash_file(info, server, location) @@ -2140,7 +2138,6 @@ end -- @param resultname -- @return the buildid function e2tool.buildid(info, resultname) - e2lib.log(4, string.format("get buildid for %s", resultname)) local r = info.results[resultname] local id, e = e2tool.pbuildid(info, resultname) if not id then @@ -2172,8 +2169,7 @@ local function chrootgroupid(info, groupname) end hc:hash_line(fileid) end - e2lib.log(4, string.format("hash data for chroot group %s\n%s", - groupname, hc.data)) + e2lib.logf(4, "hash data for chroot group %s\n%s", groupname, hc.data) g.groupid = hc:hash_finish() return g.groupid end @@ -2192,7 +2188,6 @@ end -- @param resultname -- @return the buildid function e2tool.pbuildid(info, resultname) - e2lib.log(4, string.format("get pbuildid for %s", resultname)) local e = err.new("error calculating result id for result: %s", resultname) local r = info.results[resultname] @@ -2269,8 +2264,7 @@ function e2tool.pbuildid(info, resultname) hc:hash_line(hash) end end - e2lib.log(4, string.format("hash data for resultid %s\n%s", - resultname, hc.data)) + e2lib.logf(4, "hash data for resultid %s\n%s", resultname, hc.data) r.resultid = hash.hash_finish(hc) -- result id (without deps) hc = hash.hash_start() @@ -2304,8 +2298,7 @@ function e2tool.pbuildid(info, resultname) hc:hash_line(hash) end end - e2lib.log(4, string.format("hash data for buildid %s\n%s", - resultname, hc.data)) + e2lib.logf(4, "hash data for buildid %s\n%s", resultname, hc.data) r.pbuildid = hash.hash_finish(hc) -- buildid (with deps) return r.build_mode.buildid(r.pbuildid) end @@ -2314,13 +2307,13 @@ end -- @param info -- @return nothing function e2tool.calc_buildids(info) - e2lib.logf(3, "calculating buildids") + e2lib.log(3, "calculating buildids") for _,r in ipairs(info.results) do local bid, pbid bid = buildid(info, r) pbid = e2tool.pbuildid(info, r) - e2lib.logf(3, "result %20s: pbid(%s) bid(%s)", - r, e2tool.bid_display(pbid), e2tool.bid_display(bid)) + e2lib.logf(3, "result %20s: pbid(%s) bid(%s)", r, + e2tool.bid_display(pbid), e2tool.bid_display(bid)) end end @@ -2356,8 +2349,7 @@ end --- add source result. local function add_source_result(info, sourcename, source_set) - e2lib.log(3, string.format("adding source result for source %s", - sourcename)) + e2lib.logf(3, "adding source result for source %s", sourcename) local src = info.sources[sourcename] local r = {} r.name = string.format("src-%s", src.name) @@ -2371,7 +2363,6 @@ end --- add source results. local function add_source_results(info, source_set) - e2lib.log(4, "add source results") for _, src in pairs(info.sources) do add_source_result(info, src.name) end @@ -2454,14 +2445,11 @@ function e2tool.print_selection(info, results) if not res then return false, e:append("no such result: %s", r) end - local s = res.selected and "[ selected ]" or - "[dependency]" + local s = res.selected and "[ selected ]" or "[dependency]" local f = res.force_rebuild and "[force rebuild]" or "" local b = res.request_buildno and "[request buildno]" or "" local p = res.playground and "[playground]" or "" - e2lib.log(3, string.format( - "Selected result: %-20s %s %s %s %s", - r, s, f, b, p)) + e2lib.logf(3, "Selected result: %-20s %s %s %s %s", r, s, f, b, p) end return true, nil end diff --git a/local/files.lua b/local/files.lua index 36f5675..1adfefe 100644 --- a/local/files.lua +++ b/local/files.lua @@ -129,8 +129,8 @@ function files.cache_source(info, sourcename) local s = info.sources[sourcename] -- cache all files for this source for i,f in pairs(s.file) do - e2lib.log(4, string.format("files.cache_source: caching file %s:%s", - f.server, f.location)) + e2lib.logf(4, "files.cache_source: caching file %s:%s", f.server, + f.location) local flags = { cache = true } if f.server ~= info.root_server_name then local rc, e = info.cache:cache_file(f.server, f.location, flags) @@ -138,8 +138,8 @@ function files.cache_source(info, sourcename) return false, e end else - e2lib.log(4, string.format("not caching %s:%s (stored locally)", - f.server, f.location)) + e2lib.logf(4, "not caching %s:%s (stored locally)", f.server, + f.location) end end return true, nil @@ -329,7 +329,6 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) return false, e:cat(re) end local symlink = nil - e2lib.log(4, string.format("prepare source: %s", sourcename)) local s = info.sources[sourcename] for _,file in ipairs(info.sources[sourcename].file) do if file.sha1 then @@ -497,8 +496,7 @@ function files.sourceid(info, sourcename, sourceset) hash.hash_line(hc, tostring(f.patch)) hash.hash_line(hc, tostring(f.copy)) end - e2lib.log(4, string.format("hash data for source %s\n%s", src.name, - hc.data)) + e2lib.logf(4, "hash data for source %s\n%s", src.name, hc.data) src.sourceid = hash.hash_finish(hc) return true, nil, src.sourceid end @@ -531,7 +529,7 @@ function files.toresult(info, sourcename, sourceset, directory) f:write(string.format(".PHONY: place\n\nplace:\n")) for _,file in ipairs(s.file) do - e2lib.log(4, string.format("export file: %s", file.location)) + e2lib.logf(4, "export file: %s", file.location) local destdir = string.format("%s/%s", directory, source) local destname = nil e2lib.mkdir(destdir, "-p") @@ -628,8 +626,7 @@ function files.toresult(info, sourcename, sourceset, directory) if not rc then return false, e:cat(re) end - e2lib.log(4, string.format("export file: %s done", - file.location)) + e2lib.logf(4, "export file: %s done", file.location) end f:close() return true, nil diff --git a/local/git.lua b/local/git.lua index 9981a94..05a378c 100644 --- a/local/git.lua +++ b/local/git.lua @@ -252,8 +252,7 @@ function git.fetch_source(info, sourcename) return false, e:cat(re) end local wrk = info.root .. "/" .. src.working - e2lib.log(2, string.format("cloning %s:%s [%s]", - src.server, src.location, src.branch)) + e2lib.logf(2, "cloning %s:%s [%s]", src.server, src.location, src.branch) local skip_checkout = e2lib.globals.git_skip_checkout rc, re = generic_git.git_clone_from_server(info.cache, src.server, src.location, wrk, false) @@ -490,8 +489,7 @@ function git.sourceid(info, sourcename, sourceset) hash.hash_line(hc, src.location) hash.hash_line(hc, src.working) hash.hash_line(hc, src.commitid[sourceset]) - e2lib.log(4, string.format("hash data for source %s\n%s", src.name, - hc.data)) + e2lib.logf(4, "hash data for source %s\n%s", src.name, hc.data) src.sourceid[sourceset] = hash.hash_finish(hc) return true, nil, src.sourceid[sourceset] end -- 2.39.5