diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-03-01 00:08:58 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-03-01 00:27:08 +0200 |
commit | c1247bc8dd0f1072485d0b300e0c4a21d16d8b15 (patch) | |
tree | 5021f01cd011b8c8be7a5ed492adaa8b852d56ee /update-luatex-font-database.lua | |
parent | 4fa1adf0cf2eccb58b55730a9cae888249b8230c (diff) | |
download | luaotfload-c1247bc8dd0f1072485d0b300e0c4a21d16d8b15.tar.gz |
Rewrite logging
Diffstat (limited to 'update-luatex-font-database.lua')
-rw-r--r-- | update-luatex-font-database.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/update-luatex-font-database.lua b/update-luatex-font-database.lua index e236033..0363f00 100644 --- a/update-luatex-font-database.lua +++ b/update-luatex-font-database.lua @@ -29,7 +29,7 @@ local names = fonts.names names.basename = names.basename or "otfl-names.lua" names.version = names.version or 2.004 -local log = names.log +local log = logs.report local function help_msg() texio.write_nl(string.format([[Usage: %s [OPTION]... @@ -92,7 +92,7 @@ local function do_run_fc_cache(c) if system == 'windows' then toexec = 'fc-cache.exe' -- TODO: to test on a non-cygwin Windows end - names.log(1, 'Executing %s...\n', toexec) + log('executing %s...\n', toexec) os.execute(toexec) end @@ -148,10 +148,10 @@ mkluatexfontdb.directory = kpse.expand_var("$TEXMFVAR") .. mkluatexfontdb.subtex local function generate(force) - texio.write("luaotfload | Generating font names database.") + log("generating font names database.") local savepath = mkluatexfontdb.directory if not lfs.isdir(savepath) then - log(1, "Creating directory %s", savepath) + log("creating directory %s", savepath) lfs.mkdir(savepath) if not lfs.isdir(savepath) then texio.write_nl(string.format("Error: cannot create directory '%s', exiting.\n", savepath)) @@ -168,10 +168,10 @@ local function generate(force) local fontnames fontnames = dofile(kpse.find_file(names.basename)) fontnames = names.update (fontnames, force) - log(1, "%s fonts in %s families saved in the database", + log("%s fonts in %s families saved in the database", #fontnames.mappings, #table.keys(fontnames.families)) io.savedata(savepath, table.serialize(fontnames, true)) - log(1, "Saved font names database in %s\n", savepath) + log("saved font names database in %s\n", savepath) end generate(force_reload) |