logger

package
v0.4.26 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 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 `mapstructure:"level" json:"level" default:"info"`
	Output string `mapstructure:"output" json:"output" default:"stdout"`
	Type   string `mapstructure:"type" json:"type" default:"json"`
}

type Logger

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

func CreateTestLogger

func CreateTestLogger() *Logger

func NewLogger

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

func (*Logger) Trace

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

func (*Logger) TraceContext

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

func (*Logger) With

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