logger

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 1 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(args ...interface{})
	Debugf(template string, args ...interface{})
	Info(args ...interface{})
	Infof(template string, args ...interface{})
	Warn(args ...interface{})
	Warnf(template string, args ...interface{})
	Error(args ...interface{})
	Errorf(template string, args ...interface{})
	Panic(args ...interface{})
	Panicf(template string, args ...interface{})
	Fatal(args ...interface{})
	Fatalf(template string, args ...interface{})
}

Logger is basic interface for integrating custom logger

type ZapLogger

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

ZapLogger object using simple SugaredLogger

func NewZapLogger

func NewZapLogger(debug bool) (*ZapLogger, error)

NewZapLogger creates a zap production or development logger based on debug argument

func (ZapLogger) Debug

func (z ZapLogger) Debug(args ...interface{})

Debug uses zap to log a debug message.

func (ZapLogger) Debugf

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

Debugf uses zap to log a debug message.

func (ZapLogger) Error

func (z ZapLogger) Error(args ...interface{})

Error uses zap to log a error message.

func (ZapLogger) Errorf

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

Errorf uses zap to log a error message.

func (ZapLogger) Fatal

func (z ZapLogger) Fatal(args ...interface{})

Fatal uses zap to log a fatal message.

func (ZapLogger) Fatalf

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

Fatalf uses zap to log a fatal message.

func (ZapLogger) Info

func (z ZapLogger) Info(args ...interface{})

Info uses zap to log a info message.

func (ZapLogger) Infof

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

Infof uses zap to log a info message.

func (ZapLogger) Panic

func (z ZapLogger) Panic(args ...interface{})

Panic uses zap to log a panic message.

func (ZapLogger) Panicf

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

Panicf uses zap to log a panic message.

func (ZapLogger) Warn

func (z ZapLogger) Warn(args ...interface{})

Warn uses zap to log a warning message.

func (ZapLogger) Warnf

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

Warnf uses zap to log a warning message.

Jump to

Keyboard shortcuts

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