diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-13 21:50:20 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-13 21:50:20 +0200 |
commit | 646092976d0686a566554039b3f426a55b4f1266 (patch) | |
tree | a80d4e48582f4148f6d96b5fd012261963ec76d8 | |
parent | 60d61d05ea89cc9e9f6a97fa4a807d649c70c3d3 (diff) | |
download | luaotfload-646092976d0686a566554039b3f426a55b4f1266.tar.gz |
add note about loggers
-rw-r--r-- | luaotfload-override.lua | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/luaotfload-override.lua b/luaotfload-override.lua index 51d2749..5e642e4 100644 --- a/luaotfload-override.lua +++ b/luaotfload-override.lua @@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['luat-ovr'] = { license = "GNU GPL v2" } -local module_name = "luaotfload" +local module_name = "luaotfload" local texiowrite_nl = texio.write_nl local stringformat = string.format @@ -75,6 +75,32 @@ end --- at default (zero), we aim to be quiet local level_ids = { common = 1, loading = 2, search = 3 } +--[[doc-- + + The names_report logger is used more or less all over luaotfload. + Its requirements are twofold: + + 1) Provide two logging channels, the terminal and the log file; + 2) Allow for control over verbosity levels. + + The first part is addressed by specifying the log *mode* as the + first argument that can be either “log”, meaning the log file, or + “both”: log file and stdout. Anything else is taken as referring to + stdout only. + + Verbosity levels, though not as fine-grained as e.g. Context’s + system of tracers, allow keeping the logging spam caused by + different subsystems manageable. By default, luaotfload will not + emit anything if things are running smoothly on level zero. Only + warning messages are relayed, while the other messages are skipped + over. (This is a little sub-optimal performance-wise since the + function calls to the logger are executed regardless.) The log + level during a Luatex run can be adjusted by setting the “loglevel” + field in config.luaotfload, or by calling logs.set_loglevel() as + defined above. + +--doc]]-- + local names_report = function (mode, lvl, ...) if type(lvl) == "string" then lvl = level_ids[lvl] |