logger

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package logger provides constructors for the standard library *slog.Logger used throughout loafer-go v3.

New returns a logger writing structured, leveled output to stdout via a slog.TextHandler, while NewNoOp returns a logger that discards all output. The library uses the standard library *slog.Logger type everywhere and does not define a custom logging interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *slog.Logger

New returns a default *slog.Logger that writes structured, leveled output to stdout using a slog.TextHandler on os.Stdout.

func NewNoOp

func NewNoOp() *slog.Logger

NewNoOp returns a *slog.Logger backed by a discard handler. Every record is dropped, making it a safe default when no logging output is desired.

Types

This section is empty.

Jump to

Keyboard shortcuts

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