log

package
v0.0.0-...-06621f0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptGinkgo

func AdaptGinkgo()

func Init

func Init(cfg Config)

Types

type Config

type Config struct {
	Format Format `koanf:"format" validate:"required,oneof=json text"`
	Level  Level  `koanf:"level" validate:"required,oneof=debug info warn error"`
	Caller bool   `koanf:"caller"`
}

type Format

type Format string
const (
	FormatJSON Format = "json"
	FormatText Format = "text"
)

type Level

type Level string
const (
	LevelDebug Level = "debug"
	LevelInfo  Level = "info"
	LevelWarn  Level = "warn"
	LevelError Level = "error"
)

func (Level) SlogLevel

func (l Level) SlogLevel() slog.Level

Jump to

Keyboard shortcuts

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