logs

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package logs centralises slog wiring for deadzone's binaries so the MCP server and scraper produce consistent JSON-on-stderr output.

Both cmd/server and cmd/scraper call New at startup with os.Stderr. Server stdout is reserved for the MCP JSON-RPC channel — anything written there that isn't a valid JSON-RPC message disconnects the client — so logs MUST go to stderr. The scraper writes to stderr too for consistency, even though it's a one-shot CLI without that constraint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(w io.Writer, verbose bool) *slog.Logger

New returns a JSON slog.Logger writing to w.

When verbose is true the minimum level is Debug, which both unlocks per-doc traces in the scraper (slog.Debug) and lets binaries opt into extra fields gated on the same flag. Otherwise the level is Info.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL