logctl

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package logctl owns the process-wide slog handler so the debug_logs setting (<configDir>/config.json) flips the level at runtime: Install once at startup picks the boot level, and SetDebug moves a shared slog.LevelVar the handler reads at log time (Info by default, Debug when set).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.12.16

func Debug() bool

Debug reports whether the active log level is debug.

func Install

func Install(ctx context.Context, configDir string)

Install wires the shared LevelVar into slog's default logger and reads the initial level from configDir/config.json (settings.DebugLogs); call once at startup, before any slog call that matters.

func SetDebug

func SetDebug(on bool)

SetDebug flips the active log level at runtime.

Types

This section is empty.

Jump to

Keyboard shortcuts

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