asynclogger

package module
v0.0.0-...-a7c6da7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: GPL-2.0 Imports: 4 Imported by: 0

README

asynclogger

An async logger used to store access log for web servers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Path      string
	MaxSize   int
	BufLimit  int
	QueueSize int
	Level     string
	ZapConf   zapcore.EncoderConfig
}

type Logger

type Logger struct {
	Zap        *zap.Logger
	Lumberjack *lumberjack.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(conf *Conf) *Logger

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...zap.Field)

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...zap.Field)

func (*Logger) Rotate

func (l *Logger) Rotate() error

func (*Logger) Sync

func (l *Logger) Sync() error

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...zap.Field)

func (*Logger) Write

func (l *Logger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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