Difference between revisions of "Log file"
Jump to navigation
Jump to search
(Stuff on log files) |
m |
||
Line 18: | Line 18: | ||
[[Trackers]] | [[Trackers]] | ||
+ | |||
+ | [[Category:Tools]] |
Latest revision as of 15:01, 8 June 2020
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}