logger

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger added in v0.2.0

func NewLogger(lc LogConfig) *zerolog.Logger

Types

type LogConfig added in v0.2.0

type LogConfig struct {
	Level          LogLevel
	ConsoleEnabled bool // is log to console
	FileEnabled    bool // is log to file
	LogDir         string
	FileName       string
	MaxSize        int // MaxSize the max size in MB of the logfile before it's rolled
	MaxBackups     int // MaxBackups the max number of rolled files to keep
	MaxAge         int // MaxAge the max age in days to keep a logfile
}

type LogLevel added in v0.2.0

type LogLevel int
const (
	Debug LogLevel = iota
	Info
	Warn
	Error
	Fatal
)

Jump to

Keyboard shortcuts

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