log

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(cf ...*Options)

Types

type Logger

type Logger struct {
	*zap.Logger
	sync.RWMutex
	Opts *Options
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger() (ret *Logger)

GetLogger returns logger

func (*Logger) GetLevel

func (l *Logger) GetLevel() (level zapcore.Level)

type Options

type Options struct {
	LogFileDir string
	AppName    string
	MaxSize    int //文件多大开始切分
	MaxBackups int //保留文件个数
	MaxAge     int //文件保留最大实际
	Level      string
}

Jump to

Keyboard shortcuts

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