hal/log.lisp
Where log-event writes, or NIL for the calling thread's *ERROR-OUTPUT*.
A Slynk worker rebinds *ERROR-OUTPUT* to its connection, so leaving this NIL
means an event logged while answering ./sly appears in that answer, while the
canvas and watchdog threads keep writing to the image's own error stream and
therefore to ./sly log.
Return the wall clock as HH:MM:SS.mmm, in the local zone.
Write one timestamped line about category, formatted from control.
category is a keyword naming the subsystem -- :canvas, :watchdog, :vulkan --
so a reader can tell at a glance which machine is talking.
Whether LOG-EVENT writes anything at all.
T to print every category, or a list of the category names to print.
Where LOG-EVENT writes, or NIL for the calling thread's *ERROR-OUTPUT*. A Slynk worker rebinds *ERROR-OUTPUT* to its connection, so leaving this NIL means an event logged while answering ./sly appears in that answer, while the canvas and watchdog threads keep writing to the image's own error stream and therefore to…
(category control &rest arguments)Write one timestamped line about CATEGORY, formatted from CONTROL. CATEGORY is a keyword naming the subsystem -- :canvas, :watchdog, :vulkan -- so a reader can tell at a glance which machine is talking.
(category)Logical disjunction of tests and raw truth values.
Logical conjunction of tests and raw truth values.
Addition over compatible quantities.
One line per event, for the parts of luv that would otherwise be silent.
luvcraft says nothing at all in ordinary operation. That is comfortable until something stops working, and then there is no record of a window that never appeared, a canvas that stopped pumping, or a swapchain rebuilt on every frame. A timestamped, categorised line on standard error costs nothing while things work and is the whole story when they do not.
This is deliberately not a logging framework. There are no levels, no appenders, and no configuration file: a category, a format string, and a stream that ./sly log already tails. Anything that happens once per frame does not belong here -- the trace zones in trace.lisp exist for that.