logger

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Overview

Package logger provides a minimal structured-logger interface and a default stdlib-based implementation for the poya SDK.

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, keysAndValues ...any)
	Info(msg string, keysAndValues ...any)
	Warn(msg string, keysAndValues ...any)
	Error(msg string, keysAndValues ...any)
}

Logger is the interface used by the poya SDK for all log output. It follows the idiomatic Go pattern (like zap's sugared logger or klog).

func New

func New() Logger

New returns a default Logger that writes to stderr using log/slog.

func NewWithHandler

func NewWithHandler(h slog.Handler) Logger

NewWithHandler returns a Logger backed by the given slog.Handler. Useful for tests or custom formatting.

Jump to

Keyboard shortcuts

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