log

package
v1.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextLogger

type ContextLogger interface {
	// DebugContext logs at Debug level with context
	DebugContext(ctx context.Context, msg string, args ...any)

	// InfoContext logs at Info level with context
	InfoContext(ctx context.Context, msg string, args ...any)

	// WarnContext logs at Warn level with context
	WarnContext(ctx context.Context, msg string, args ...any)

	// ErrorContext logs at Error level with context
	ErrorContext(ctx context.Context, msg string, args ...any)
}

ContextLogger defines the core logging methods with context.

type FullLogger

type FullLogger interface {
	Logger
	ContextLogger
	Handler
}

type Handler

type Handler slog.Handler

Handler represents a logging handler that processes and formats log records for output or further handling.

type Logger

type Logger interface {
	// Debug logs at Debug level
	Debug(msg string, args ...any)

	// Info logs at Info level
	Info(msg string, args ...any)

	// Warn logs at Warn level
	Warn(msg string, args ...any)

	// Error logs at Error level
	Error(msg string, args ...any)
}

Logger defines the core logging methods without context.

Jump to

Keyboard shortcuts

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