adapter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerFactory

type LoggerFactory struct {
	// contains filtered or unexported fields
}

LoggerFactory creates configured loggers

func NewLoggerFactory

func NewLoggerFactory(pipeline *logging.Pipeline) *LoggerFactory

NewLoggerFactory creates a new logger factory

func (*LoggerFactory) GetLogger

func (f *LoggerFactory) GetLogger(source string) *slog.Logger

GetLogger gets or creates a logger for a source

type SlogHandler

type SlogHandler struct {
	// contains filtered or unexported fields
}

SlogHandler adapts slog to our logging system

func NewSlogHandler

func NewSlogHandler(writer logging.Writer, source string) *SlogHandler

NewSlogHandler creates a new slog handler

func (*SlogHandler) Enabled

func (h *SlogHandler) Enabled(_ context.Context, level slog.Level) bool

Enabled implements slog.Handler

func (*SlogHandler) Handle

func (h *SlogHandler) Handle(ctx context.Context, r slog.Record) error

Handle implements slog.Handler

func (*SlogHandler) WithAttrs

func (h *SlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler

WithAttrs implements slog.Handler

func (*SlogHandler) WithGroup

func (h *SlogHandler) WithGroup(name string) slog.Handler

WithGroup implements slog.Handler

Jump to

Keyboard shortcuts

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