logger_zap

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

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 8 Imported by: 0

README

logger-zap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (logger.Logger, error)

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Debug

func (z *Logger) Debug(args ...interface{})

func (*Logger) Debugf

func (z *Logger) Debugf(template string, args ...interface{})

func (*Logger) Error

func (z *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (z *Logger) Errorf(template string, args ...interface{})

func (*Logger) Info

func (z *Logger) Info(args ...interface{})

func (*Logger) Infof

func (z *Logger) Infof(template string, args ...interface{})

func (*Logger) IsDebugEnabled

func (z *Logger) IsDebugEnabled() bool

func (*Logger) IsErrorEnabled

func (z *Logger) IsErrorEnabled() bool

func (*Logger) IsInfoEnabled

func (z *Logger) IsInfoEnabled() bool

func (*Logger) IsWarnEnabled

func (z *Logger) IsWarnEnabled() bool

func (*Logger) SetLevel

func (z *Logger) SetLevel(lv logger.Level)

func (*Logger) Sync

func (z *Logger) Sync() error

func (*Logger) Warn

func (z *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (z *Logger) Warnf(template string, args ...interface{})

func (*Logger) With

func (z *Logger) With(args ...interface{})

func (*Logger) WithTrace

func (z *Logger) WithTrace(traceID string)

type Option

type Option func(*Logger)

func EnableConsole

func EnableConsole(enabled bool) Option

EnableConsole

func EnableRotate

func EnableRotate(enabled bool, maxSize, maxAge, maxBackups int) Option

func Fields

func Fields(pair ...interface{}) Option

func Filename

func Filename(filename string) Option

func Level

func Level(lv logger.Level) Option

Jump to

Keyboard shortcuts

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