Logging
One command starts a transcript:
/log start -- ~/.config/rune/logs/<timestamp>.log/log start quest.log -- or name it/log start raw -- keep the colors (view with `less -R`)/log status/log stopThe log mirrors what you saw: server lines after triggers ran (rewrites
logged as rewritten, gagged lines omitted) plus the local echo of what
you typed. Prompts are skipped. Passwords stay out, because the echo
doesn’t fire while the server hides input. By default the log is
ANSI-stripped so it reads anywhere; raw keeps the escape codes for a
color-faithful transcript.
An active log survives /reload (the file handle is owned by the client,
not the Lua VM) and closes cleanly on exit.
From Lua
Section titled “From Lua”rune.log.start(path?, opts?) -- returns the resolved path, or nil + error -- opts: { raw = true } keeps ANSI codesrune.log.stop() -- returns true if a log was openrune.log.status() -- active path or nilrune.log.write(text) -- append a line directly (no-op when not logging)Changing the policy
Section titled “Changing the policy”What gets written is two hooks, named log-output and log-echo at
priority 200. To add timestamps, replace one:
rune.hooks.disable("log-output")rune.hooks.on("output", function(line) rune.log.write(os.date("[%H:%M:%S] ") .. line:clean())end, { priority = 200 })To log every raw line including gagged ones, register at a priority below 100, before the trigger handler runs.
To auto-log every session:
rune.hooks.on("connected", function(addr) if not rune.log.status() then rune.log.start() endend)Related: rune.log reference, Hooks & Events, Triggers