Input and compilation/Log file
< Input and compilation
Jump to navigation
Jump to search
Revision as of 21:25, 10 January 2025 by Garulfoo (talk | contribs) (Garulfoo moved page Log file to Input and compilation/Log file: improving wiki structure and navigation)
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}