• v1.11.0 d690f59c56

    v1.11.0 — caller tags and real stack traces
    All checks were successful
    CI / build-and-test (push) Successful in 1m57s
    CI / docker-build (push) Successful in 22s
    Stable

    joeyr released this 2026-08-02 23:07:09 -05:00 | 2 commits to main since this release

    Every 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 prediction
    

    That was the whole line. The stack existed at the call site and was thrown
    away there: 131 sites pre-stringified the message with the instanceof Error
    ternary, and another 27 passed the Error positionally 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)
    

    error is one of exactly two key names Portainer colours red, and
    stack_trace gets the renderer that prints one indented at func (source:line)
    per frame.

    Added

    • A caller tag on every line. A closed PHASES union — 45 tags, two
      segments each — and forPhase(), 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, and plugins/lol/monitor and
      plugins/d2emu/monitor would 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 into error
      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-Error carries its
      contents rather than [object Object], and a wrapped error reports its
      cause.

    Fixed

    • A message key 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 in ErrorHandler.
    • 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
      without format.splat().
    • ErrorHandler logged 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 what caller is.
    • 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, which caller already attributes to
      db/pool, db/messages and discord/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