logging

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger added in v1.1.6

func NewLogger(level slog.Level) *slog.Logger

NewLogger creates a new slog.Logger with a text handler at the given level.

func NewWriter added in v1.1.6

func NewWriter(logger *slog.Logger) io.WriteCloser

NewWriter returns an io.WriteCloser that logs each line written to it using the provided slog.Logger at Info level.

func ParseLevel added in v1.1.6

func ParseLevel(s string) slog.Level

ParseLevel parses a log level string into slog.Level. Supported values: debug, info, warn, error (case-insensitive). Defaults to info if the value is unrecognized.

Types

type Logger

type Logger = *slog.Logger

Logger is the application logger type, backed by slog.

Jump to

Keyboard shortcuts

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