followingup-logging.tex /size: 3000 b    last modification: 2021-10-28 13:50
1% language=us runpath=texruns:manuals/followingup
2
3\startcomponent followingup-logging
4
5\environment followingup-style
6
7\startchapter[title={Logging}]
8
9\startsection[title={Introduction}]
10
11In \CONTEXT\ we have quite some logging enabled by default and even more when
12you enable trackers. Most logging is done with \LUA, which is quite efficient.
13Information from the \TEX\ machinery follows a different path and one reason
14for that is that it often happens on a character (or small strings) basis.
15
16The runtime of a job is, in spite of what one may expect, also dependent on the
17speed of the console: what fonts are used (there can be font features being
18applied), is the output buffered, and with what delays, how large is the history,
19etc. When more complex fonts arrived I found out that on \OSX\ generating a
20format was impacted by seconds. When on \MSWINDOWS\ the normal console was used
21its character|-|by|-|character flushing made it sluggish, and on \LINUX\ it
22depended on the font, kind of console, delays, etc. Lucky me, the \SCITE\ editors
23log pane beats them all. \footnote {I use the \LINUX\ subsystem on \MSWINDOWS\
24for cross compiling \LUATEX, and with the advent of that subsystem the regular
25console was also rewritten so most of the delays are gone now.}
26
27At the \TEX\ end a few decades of coding has made the system also complex.
28\footnote {Interfaces like that are only partly defined by \TEX\ and left to the
29implementation.} Each string goes through a mechanism that checks with line
30ending to apply and where to cut off lines exceeding a preset maximum length,
31where \LUATEX\ also needs to take \UTF\ into account. Some characters can
32(optionally) be escaped with \type {^^} and occasionally the line length gets
33reset by explicit newline commands.
34
35In \CONTEXT\ already for a long time we always used an (at least) 10K line length
36and disabled output escaping. We have consoles that can handle long lines and
37live in an \UTF\ world so escaping makes no sense. And, when \OPENTYPE\ features
38get applied random line breaks can interfere badly. Just in case one wonders what
39happens with so called \type{null} characters: as all goes through \CCODE\
40anyway, such a character just terminates a string. Therefore the line length
41limitations have been removed and the line|-|ending substitution be optimized. In
42principle this gives simpler codes and less overhead.
43
44The log is not always compatible with \LUATEX. For instance we output more details
45about node lists. This is natural because we have more subtypes and these can
46provide additional information (clues) when debugging \TEX\ code.
47
48In \LUATEX\ the error handling is already such that some can be delegated to
49\LUA, and later I will look into more isolation. But, error handling is quite
50interwoven in the code and I don't want to mess up the original concept too much.
51\footnote {Indeed the error handling was redone in such a way that we now have an
52even better isolation.}
53
54\stopsection
55
56\stopchapter
57
58\stopcomponent
59