logging

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package logging provides a minimal, structured logging interface for modkit applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string, args ...any)
	Info(msg string, args ...any)
	Warn(msg string, args ...any)
	Error(msg string, args ...any)
	With(args ...any) Logger
}

Logger is the core logging interface used throughout modkit. It provides structured logging with key-value pairs and log levels.

func NewNopLogger

func NewNopLogger() Logger

NewNopLogger returns a Logger that discards all log messages. Useful for testing or when logging is not needed.

func NewSlogLogger

func NewSlogLogger(logger *slog.Logger) Logger

NewSlogLogger wraps a standard library slog.Logger to implement the modkit Logger interface. Returns a NopLogger if the provided logger is nil.

Jump to

Keyboard shortcuts

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