Log file

From Wiki
Jump to navigation Jump to search

Running context myfile.tex produces a log file myfile.log. One can also write to the log file oneself, as follows:

commands.writestatus("mylog", "mymessage")

Which results in the following line in the log file:

mylog           > mymessage 

The log name can be anything; it simply helps to identify messages about the same issue. If one is writing to the same log every time, as often happens within a module, create a special reporter with logs.reporter:

local myreporter = logs.reporter("mylog")
myreporter("mymessage")
-- mylog           > mymessage

This is all from Lua; from the ConTeXt end, one can write to the log file with \writestatus{logname}{message}

See also

Trackers