logging

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupLogger

func SetupLogger(level string) (*slog.Logger, error)

SetupLogger creates a structured JSON logger writing to os.Stderr at the given level. The level string is case-insensitive and must be one of debug, info, warn, or error.

func SetupLoggerWithWriter

func SetupLoggerWithWriter(level string, w io.Writer) (*slog.Logger, error)

SetupLoggerWithWriter creates a structured JSON logger writing to w at the given level. Exposed so tests can capture log output into a buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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