wrapper

package
v0.0.0-...-036ea64 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LazyLog

func LazyLog(name string) func() *zerolog.Logger

func LoadLogs

func LoadLogs(content []byte) error

func LoadLogsFromFile

func LoadLogsFromFile(name string) error

func Log

func Log(name string) *zerolog.Logger

func OnceValue

func OnceValue[T any](f func() T) func() T

Types

type Config

type Config struct {
	Path     string `yaml:"path"`
	FileName string `yaml:"file-name"`
	Level    string `yaml:"level"`
	Rotate   struct {
		Size           string `yaml:"size"`
		BackupLimit    int    `yaml:"backup-limit"`
		BackupExpire   int    `yaml:"backup-expire"` // unit: day
		BackupCompress bool   `yaml:"backup-compress"`
	} `yaml:"rotate"`
	Stdout bool `yaml:"stdout"`
}

Jump to

Keyboard shortcuts

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