log

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = iota - 1
	InfoLevel
	WarnLevel
	ErrorLevel

	RotateMaxSize    = 300
	RotateMaxAge     = 7
	RotateMaxBackups = 15
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

func Debugf

func Debugf(msg string, args ...interface{})

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

func Error

func Error(msg string)

func Errorf

func Errorf(msg string, args ...interface{})

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatalf

func Fatalf(template string, args ...interface{})

func Fatalw

func Fatalw(msg string, keysAndValues ...interface{})

func Info

func Info(msg string)

func Infof

func Infof(msg string, args ...interface{})

func Infow

func Infow(msg string, keysAndValues ...interface{})

func Init

func Init(config *Config)

func NewLogger

func NewLogger(conf *Config) *zap.Logger

func NewSugaredLogger

func NewSugaredLogger(conf *Config) *zap.SugaredLogger

func NewkvEncoder

func NewkvEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder

func Panic

func Panic(args ...interface{})

func Panicf

func Panicf(template string, args ...interface{})

func Panicw

func Panicw(msg string, keysAndValues ...interface{})

func Warn

func Warn(msg string)

func Warnf

func Warnf(msg string, args ...interface{})

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Types

type Config

type Config struct {
	Format   string
	Level    string
	FilePath string
	Rotate   RotateConfig
}

type RotateConfig

type RotateConfig struct {
	Compress   bool
	MaxSize    int
	MaxAge     int
	MaxBackups int
}

Directories

Path Synopsis
Package bufferpool houses zap's shared internal buffer pool.
Package bufferpool houses zap's shared internal buffer pool.
Package pool provides internal pool utilities.
Package pool provides internal pool utilities.

Jump to

Keyboard shortcuts

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