logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logger provides a thin wrapper around log/slog for structured logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(w io.Writer, level, format string) *slog.Logger

New returns a *slog.Logger configured for the given level and format. It accepts an optional io.Writer (w) for testing; if nil, it defaults to os.Stdout. level: "debug" | "info" | "warn" | "error" (default: "info") format: "json" | "text" (default: "json")

Types

This section is empty.

Jump to

Keyboard shortcuts

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