logs

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string)
	Info(msg string)
	Warn(msg string)
	Error(msg string)

	Debugf(format string, a ...interface{})
	Infof(format string, a ...interface{})
	Warnf(format string, a ...interface{})
	Errorf(format string, a ...interface{})

	DebugDepth(msg string, dep int)
	InfoDepth(msg string, dep int)
	WarnDepth(msg string, dep int)
	ErrorDepth(msg string, dep int)
}

func NewLoggerInterface

func NewLoggerInterface(logDir string, maxSize, maxBackups int) Logger

type OptionFunc

type OptionFunc func(op *option)

func WithOptionLogFileConfig

func WithOptionLogFileConfig(fName string, maxSize, maxBackups int) OptionFunc

type ZapLogger

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

func NewLogger

func NewLogger(logDir string, maxSize, maxBackups int) *ZapLogger

maxSize mini size is 1Mib

func NewZopLogger

func NewZopLogger(ops ...OptionFunc) *ZapLogger

func (*ZapLogger) Debug

func (z *ZapLogger) Debug(msg string)

func (*ZapLogger) DebugDepth

func (z *ZapLogger) DebugDepth(msg string, dep int)

func (*ZapLogger) Debugf

func (z *ZapLogger) Debugf(format string, a ...interface{})

func (*ZapLogger) Error

func (z *ZapLogger) Error(msg string)

func (*ZapLogger) ErrorDepth

func (z *ZapLogger) ErrorDepth(msg string, dep int)

func (*ZapLogger) Errorf

func (z *ZapLogger) Errorf(format string, a ...interface{})

func (*ZapLogger) Info

func (z *ZapLogger) Info(msg string)

func (*ZapLogger) InfoDepth

func (z *ZapLogger) InfoDepth(msg string, dep int)

func (*ZapLogger) Infof

func (z *ZapLogger) Infof(format string, a ...interface{})

func (*ZapLogger) Warn

func (z *ZapLogger) Warn(msg string)

func (*ZapLogger) WarnDepth

func (z *ZapLogger) WarnDepth(msg string, dep int)

func (*ZapLogger) Warnf

func (z *ZapLogger) Warnf(format string, a ...interface{})

Jump to

Keyboard shortcuts

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