log

package
v1.0.8-pro Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DPanicLevel

func DPanicLevel(level zapcore.Level) bool

DPanicLevel method is Logs map value

func DebugLevel

func DebugLevel(level zapcore.Level) bool

DebugLevel method is Logs map value

func ErrorLevel

func ErrorLevel(level zapcore.Level) bool

ErrorLevel method is Logs map value

func FatalLevel

func FatalLevel(level zapcore.Level) bool

FatalLevel method is Logs map value

func InfoLevel

func InfoLevel(level zapcore.Level) bool

InfoLevel method is Logs map value

func PanicLevel

func PanicLevel(level zapcore.Level) bool

PanicLevel method is Logs map value

func WarnLevel

func WarnLevel(level zapcore.Level) bool

WarnLevel method is Logs map value

Types

type Level

type Level func(zapcore.Level) bool

type LoggerParam

type LoggerParam struct {
	Path       string `json:"path" toml:"path" yaml:"path" xml:"path"`                         // log file path
	MaxSize    int    `json:"maxSize" toml:"maxSize" yaml:"maxSize" xml:"maxSize"`             // log file max size
	MaxBackups int    `json:"maxBackups" toml:"maxBackups" yaml:"maxBackups" xml:"maxBackups"` // log file max backups
	MaxAge     int    `json:"maxAge" toml:"maxAge" yaml:"maxAge" xml:"maxAge"`                 // log file max save day
	Compress   bool   `json:"compress" toml:"compress" yaml:"compress" xml:"compress"`         // log file whether to compress
}

LoggerParam

func (*LoggerParam) Default

func (log *LoggerParam) Default() *zap.SugaredLogger

Default

func (*LoggerParam) New

func (log *LoggerParam) New(logs Logs) *zap.SugaredLogger

New

type Logs

type Logs map[string]Level

Jump to

Keyboard shortcuts

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