logger

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 6

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 NoOpLogger added in v0.0.26

type NoOpLogger struct{}

NoOpLogger is a type that implements the Logger interface but does nothing when it's methods are called

func NewNoOpLogger added in v0.0.26

func NewNoOpLogger() NoOpLogger

NewNoOpLogger returns a NoOpLogger

func (NoOpLogger) Debug added in v0.0.26

func (m NoOpLogger) Debug(args ...interface{})

Debug does nothing on a NoOpLogger

func (NoOpLogger) Debugf added in v0.0.26

func (m NoOpLogger) Debugf(template string, args ...interface{})

Debugf does nothing on a NoOpLogger

func (NoOpLogger) Error added in v0.0.26

func (m NoOpLogger) Error(args ...interface{})

Error does nothing on a NoOpLogger

func (NoOpLogger) Errorf added in v0.0.26

func (m NoOpLogger) Errorf(template string, args ...interface{})

Errorf does nothing on a NoOpLogger

func (NoOpLogger) Fatal added in v0.0.26

func (m NoOpLogger) Fatal(args ...interface{})

Fatal does nothing on a NoOpLogger

func (NoOpLogger) Fatalf added in v0.0.26

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

Fatalf does nothing on a NoOpLogger

func (NoOpLogger) Info added in v0.0.26

func (m NoOpLogger) Info(args ...interface{})

Info does nothing on a NoOpLogger

func (NoOpLogger) Infof added in v0.0.26

func (m NoOpLogger) Infof(template string, args ...interface{})

Infof does nothing on a NoOpLogger

func (NoOpLogger) Panic added in v0.0.26

func (m NoOpLogger) Panic(args ...interface{})

Panic does nothing on a NoOpLogger

func (NoOpLogger) Panicf added in v0.0.26

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

Panicf does nothing on a NoOpLogger

func (NoOpLogger) Warn added in v0.0.26

func (m NoOpLogger) Warn(args ...interface{})

Warn does nothing on a NoOpLogger

func (NoOpLogger) Warnf added in v0.0.26

func (m NoOpLogger) Warnf(template string, args ...interface{})

Warnf does nothing on a NoOpLogger

type RetryableLogger added in v0.1.7

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

RetryableLogger implements the Logger interface required by the go-retryablehttp client and wraps our internal logger

func NewRetryableLogger added in v0.1.7

func NewRetryableLogger(logger Logger) RetryableLogger

NewRetryableLogger creates a RetryableLogger instance.

func (RetryableLogger) Debug added in v0.1.15

func (a RetryableLogger) Debug(msg string, args ...interface{})

func (RetryableLogger) Error added in v0.1.15

func (a RetryableLogger) Error(msg string, args ...interface{})

func (RetryableLogger) Info added in v0.1.15

func (a RetryableLogger) Info(msg string, args ...interface{})

func (RetryableLogger) Warn added in v0.1.15

func (a RetryableLogger) Warn(msg string, args ...interface{})

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 NewZapLoggerFromSugar added in v0.0.24

func NewZapLoggerFromSugar(sl zap.SugaredLogger) *ZapLogger

NewZapLoggerFromSugar creates a ZapLogger from a zap.SugaredLogger

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) Sugar added in v0.0.24

func (z ZapLogger) Sugar() *zap.SugaredLogger

Sugar returns the underlying sugared zap logger that ZapLogger uses

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