zLog

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: LGPL-2.1 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = iota - 1
	InfoLevel
	WarnLevel
	ErrorLevel
	DPanicLevel
	PanicLevel
	FatalLevel
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...zap.Field)

func Error

func Error(msg string, fields ...zap.Field)

func Fatal

func Fatal(msg string, fields ...zap.Field)

func Info

func Info(msg string, fields ...zap.Field)

func InitLogger

func InitLogger(cfg *Config, options ...zap.Option) error

func NewLogger

func NewLogger(cfg *Config, options ...zap.Option) (*zap.Logger, error)

func Panic

func Panic(msg string, fields ...zap.Field)

func Warn

func Warn(msg string, fields ...zap.Field)

Types

type Config

type Config struct {
	Level    int    `toml:"level" json:"level"`
	Console  bool   `toml:"console" json:"console"`
	Filename string `toml:"filename" json:"filename"`
	MaxSize  int    `toml:"max-size" json:"max-size"`
	MaxDays  int    `toml:"max-days" json:"max-days"`
}

Jump to

Keyboard shortcuts

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