log

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package log provides the framework's centralized logger. By default it writes structured JSON to stderr via slog. Replace the logger via Set() to wire telemetry or change format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...any)

func DebugCtx

func DebugCtx(ctx context.Context, msg string, args ...any)

func Error

func Error(msg string, args ...any)

func ErrorCtx

func ErrorCtx(ctx context.Context, msg string, args ...any)

func Info

func Info(msg string, args ...any)

func InfoCtx

func InfoCtx(ctx context.Context, msg string, args ...any)

func Logger

func Logger() *slog.Logger

Logger returns the current global logger.

func Set

func Set(l *slog.Logger)

Set replaces the global logger. Call this at application startup to wire a custom handler (e.g. OpenTelemetry, structured cloud logging, etc.).

func Warn

func Warn(msg string, args ...any)

func WarnCtx

func WarnCtx(ctx context.Context, msg string, args ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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