log

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, keyvals ...any)

func Error

func Error(msg string, keyvals ...any)

func Fatal

func Fatal(msg string, keyvals ...any)

func GetCurrentLogLevel

func GetCurrentLogLevel() zerolog.Level

func Info

func Info(msg string, keyvals ...any)

func InitGlobalLogger

func InitGlobalLogger(cfg *Config)

func NewLoggerLevel

func NewLoggerLevel(level zerolog.Level)

NewLoggerLevel initializes the logger level.

func Panic

func Panic(msg string, keyvals ...any)

func SetLoggerLevel

func SetLoggerLevel(level string)

SetLoggerLevel sets logger level based on env.

func Trace

func Trace(msg string, keyvals ...any)

func Warn

func Warn(msg string, keyvals ...any)

Types

type Config added in v0.0.4

type Config struct {
	Filename   string   `yaml:"filename"`
	Level      string   `yaml:"level"`
	Targets    []string `yaml:"targets"`
	MaxSize    int      `yaml:"max_size"`
	MaxBackups int      `yaml:"max_backups"`
	Compress   bool     `yaml:"compress"`
}

Jump to

Keyboard shortcuts

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