logger

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: BSD-3-Clause-Clear Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelTrace = slog.Level(-8)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level  string `yaml:"level" default:"info"`
	Output string `yaml:"output" default:"stdout"`
	Type   string `yaml:"type" default:"json"`
}

type Logger

type Logger struct {
	*slog.Logger
	Audit *audit.Logger
}

func NewLogger

func NewLogger(config Config) (*Logger, error)

func (*Logger) Trace added in v0.4.7

func (l *Logger) Trace(msg string, args ...any)

func (*Logger) TraceContext added in v0.4.7

func (l *Logger) TraceContext(ctx context.Context, msg string, args ...any)

func (*Logger) With added in v0.4.1

func (l *Logger) With(key string, value string) *Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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