debug

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package debug provides the SMPLKIT_DEBUG diagnostic facility. It is an internal package and must not be imported by external packages.

Set SMPLKIT_DEBUG=1 (or "true" / "yes") to enable verbose output to stderr. All other values (including unset) disable output. The environment variable is read once at package init time and cached; changes after startup are not observed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(subsystem, format string, args ...any)

Debug writes a single diagnostic line to stderr when debug output is enabled. It is a no-op when disabled and is safe to call from any goroutine.

Output format: [smplkit:{subsystem}] {RFC3339Nano timestamp} {message}\n

func Enable added in v1.6.6

func Enable()

Enable activates debug output regardless of the SMPLKIT_DEBUG env var. It is called by NewClient when debug=true is resolved from the config file or the Config struct, and may also be called directly in tests.

func IsEnabled

func IsEnabled() bool

IsEnabled reports whether debug output is currently enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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