-
released this
2026-08-02 23:07:09 -05:00 | 2 commits to main since this releaseEvery line now says which part of the bot wrote it, and an error line finally
carries a stack. Second of three releases bringing the log output to what
Portainer's viewer actually renders.What an error line used to be
2026-08-02 22:38:36 ERR Failed to record predictionThat was the whole line. The stack existed at the call site and was thrown
away there: 131 sites pre-stringified the message with theinstanceof Error
ternary, and another 27 passed theErrorpositionally as
logger.error('Failed:', error)— where winston merges it as metadata and an
Error's non-enumerable properties serialise to{}, so those lines carried
no reason at all. aufhocker has emitted no stack traces in production since
the logger was written.What it is now
2026-08-02 23:03:13 ERR lol/riot > Spectator lookup failed puuid=abc-123 error=RiotApiError: 429 rate limited by Riot at deep (/app/dist/plugins/lol/services/riotApiClient.js:17) at pollSummoner (/app/dist/plugins/lol/services/pollingService.js:474)erroris one of exactly two key names Portainer colours red, and
stack_tracegets the renderer that prints one indentedat func (source:line)
per frame.Added
- A
callertag on every line. A closedPHASESunion — 45 tags, two
segments each — andforPhase(), returning a winston child logger. Each
module takes its tag once at the top, so none of the 545 call sites changed.
Closed rather than free strings because Portainer renders only the last
two segments: a third is dropped silently, andplugins/lol/monitorand
plugins/d2emu/monitorwould have arrived identical. A typo is now a compile
error rather than a tag that quietly never appears. - Real stack traces.
errorFields()turns any thrown value intoerror
plus an array of{func, source, line}. Ported from lol-companion-data with
its 12-frame cap — Node's async traces run twenty-odd deep, mostly
node:internal/plumbing — and the right-anchored location split that keeps
a Windows drive letter with its path. A thrown non-Errorcarries its
contents rather than[object Object], and a wrapped error reports its
cause.
Fixed
- A
messagekey in metadata silently replaced the log message. Winston
merges metadata over the record, so the d2emu poll failures rendered as the
API's error text with no indication of which poll produced it. Two sites,
plus six inErrorHandler. ClaudeClient's network-retry warning lost its reason — the error went
in as a bare string second argument, which winston routes to SPLAT and drops
withoutformat.splat().ErrorHandlerlogged its context as a nested object, which Portainer
flattens to JSON inside one trailing pair — which user, which guild, which
command, in the least readable available form. Flat fields now.
Changed
- The 52
[d2emu]message prefixes are gone. That is whatcalleris. - Nested and array metadata flattened:
riotPacing={…}became three scalar
fields, and the JSON arrays (trackedQueueIds,plugins,adminIds,
availableTools,mappedUserIds) are comma-joined strings. - Six duplicate boot lines removed.
AufhockerBot.start()echoed the
success of every step it awaited, whichcalleralready attributes to
db/pool,db/messagesanddiscord/gateway.
Minor rather than patch for the changed log output. No schema, command, or
config-input changes, and nothing to do on the stack — this one arrives with
the image. The boot preflight block is all that remains of the plan.Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- A