logger

package
v0.1.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLogLevel = slog.LevelInfo

Variables

View Source
var (
	DefaultLogWriter  = os.Stderr
	DefaultTimeFormat = time.StampMilli
)
View Source
var (
	Level     slog.LevelVar
	AppLogger *slog.Logger
)

Functions

func Init

func Init(opts ...Option)

func InitWithWriter

func InitWithWriter(w io.Writer, opts ...Option)

func NewDailyWriter

func NewDailyWriter(dir, prefix string) (io.Writer, error)

func Swap

func Swap(w io.Writer, opts ...Option) func()

Types

type Option

type Option func(*slog.Logger)

func WithDebugFlag

func WithDebugFlag(debug bool) Option

func WithLevel

func WithLevel(level slog.Level) Option

Jump to

Keyboard shortcuts

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