logger

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logger initialises the application-wide slog.Logger. One logger is created at startup and passed via DI. Never call slog.SetDefault in tests — use the injected logger instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg config.LogConfig) *slog.Logger

New creates a slog.Logger from the given LogConfig. Format "json" produces structured JSON; anything else produces human-readable text.

func NewWithWriter

func NewWithWriter(w io.Writer, level slog.Level) *slog.Logger

NewWithWriter creates a logger that writes to the provided writer (useful for tests).

Types

This section is empty.

Jump to

Keyboard shortcuts

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