Skip to content

docs(logger): document log file, headless stdout, handlers and Logfami - #3

Merged
kanimaru merged 3 commits into
masterfrom
claude/jolly-bardeen-3d61e1
Oct 3, 2026
Merged

kanimaru merged 3 commits into
masterfrom
claude/jolly-bardeen-3d61e1

Conversation

@kanimaru

@kanimaru kanimaru commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Documentation for kanimaru/twitcher#143 (file logging, kanimaru/twitcher#123). Merge it together with or after that PR, since the pages describe features that only exist from there on.

Changes

  • additional/logger.md: rewritten around the logger's two jobs: console output while developing, and the log file for support.
    • Levels now include Warn and map to OpenTelemetry severities. Covers attributes, wants() and instance suffixes.
    • File logging: example output, settings table, finding the file (editor menu and an in-game support button).
    • Headless servers: JSON Lines on stdout via auto, plus a tip about flush_stdout_on_print.
    • Custom handlers: the record contract table, the auto_install opt-out as it works after the review round (first log call), and a tip on lambda handlers.
    • Correction: the old page said console settings "take effect immediately". The code reads them when a logger is created.
  • additional/logfami.md (new): the standalone library. Pipelines, quick start, levels, the three formats, resource, redaction rules, file/stdout/memory sinks, engine error capture, connecting other libraries, extending.
  • introduction/support.md: new "Send Us Your Log File" section with the user data path per OS (including custom user dirs) and which files to send.
  • additional/index.md and sidebar: Logger (it was missing from the sidebar) and Logfami.

Verification

  • Every setting key, default, class, method, format example and OS path was checked against the Twitcher source by an independent docs review; its findings (missing process.pid in header examples, an abbreviated resource, an overstated "every record", a support-page sentence contradicting file/level = off, a sample without an explicit type, a few completeness gaps) are fixed in af1c713.
  • All GDScript samples were run in a headless Godot 4.7 against the Twitcher branch.
  • vitepress build passes with no dead links; the three cross-page #anchor links were checked against the generated HTML (the emoji heading has an explicit {#send-us-your-log-file} anchor).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q278jksbLv9nSTcfSLAMKA

Documents the logging changes of kanimaru/twitcher#143:

- additional/logger.md: rewritten around the two jobs of the logger
  (console while developing, log file for support); levels incl. warn,
  attributes, file settings, finding the file, headless stdout, custom
  handlers with the record contract. Corrects the claim that console
  settings apply immediately; they're read when a logger is created.
- additional/logfami.md: new page for the standalone library: pipelines,
  formats, resource, redaction, sinks, engine capture, extending.
- introduction/support.md: "Send Us Your Log File" with the user data
  paths per operating system.
- additional/index.md and the sidebar: Logger (missing from the sidebar
  before) and Logfami.

Code samples were run in Godot 4.7; the site builds without dead links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q278jksbLv9nSTcfSLAMKA
claude added 2 commits October 1, 2026 23:08
- Explain the auto_install opt-out as it now works (first log call,
  not script load) and that uninstall() switches it off; the editor
  needs uninstall().
- Session header examples include process.pid; the prose names pid and
  runtime.
- The headless JSON example shows the full resource object.
- "every record" → "every record at info level and above".
- Support page: the file is written while the per-component console
  logs are off, not while file logging is off; lists twitcher.2.log
  and mentions godot.log in the same folder.
- Explicit type on the preload constant, per the style rules.
- Record-keys sentence reworded; apikey, "warning" and error.type
  added where the code has them.
- Lambda tip updated for TwitchLoggerManager.remove_lambda_handlers().

Site builds; cross-page anchors verified against the generated HTML.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q278jksbLv9nSTcfSLAMKA
TwitchLogLevel was removed from Twitcher in favour of LogfamiLevel.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q278jksbLv9nSTcfSLAMKA
@kanimaru
kanimaru merged commit ae08bf8 into master Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants