summaryrefslogtreecommitdiff
path: root/otfl-luat-ovr.lua
blob: 984dbf5da91168833df05016dc7db82acff111cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if not modules then modules = { } end modules ['luat-ovr'] = {
    version   = 1.001,
    comment   = "companion to luatex-*.tex",
    author    = "Khaled Hosny and Elie Roux",
    copyright = "Luaotfload Development Team",
    license   = "GNU GPL v2"
}


local module_name = "luaotfload"

local texiowrite_nl = texio.write_nl
local stringformat  = string.format
local ioflush       = io.flush
local dummyfunction = function() end

function logs.report(category,fmt,...)
    if fmt then
        texiowrite_nl('log', stringformat("%s | %s: %s",module_name,category,stringformat(fmt,...)))
    elseif category then
        texiowrite_nl('log', stringformat("%s | %s",module_name,category))
    else
        texiowrite_nl('log', stringformat("%s |",module_name))
    end
end

function logs.info(category,fmt,...)
    if fmt then
        texiowrite_nl(stringformat("%s | %s: %s",module_name,category,stringformat(fmt,...)))
    elseif category then
        texiowrite_nl(stringformat("%s | %s",module_name,category))
    else
        texiowrite_nl(stringformat("%s |",module_name))
    end
    ioflush()
end