slog

package module
v0.0.0-...-86294ec Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 5 Imported by: 0

README

template

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func NewLogger

func NewLogger(logger *slog.Logger, opts ...Option) *Logger

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) Context

func (l *Logger) Context() context.Context

func (*Logger) Log

func (l *Logger) Log(level log.Level, keyvals ...interface{}) error

type Option

type Option func(*Logger)

func WithContext

func WithContext(ctx context.Context) Option

func WithMessageKey

func WithMessageKey(key string) Option

Jump to

Keyboard shortcuts

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