logger

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(format string, args ...interface{})

func Error

func Error(args ...interface{})

func Errore

func Errore(msg string, err error)

func Errorf

func Errorf(format string, args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatale added in v0.1.6

func Fatale(msg string, err error)

func Fatalf

func Fatalf(format string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func InitLogger

func InitLogger()

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

Types

type CompatibleLogger

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

CompatibleLogger is a logger which compatible to logrus/std log/prometheus. it implements Print() Println() Printf() Dbug() Debugln() Debugf() Info() Infoln() Infof() Warn() Warnln() Warnf() Error() Errorln() Errorf() Fatal() Fataln() Fatalf() Panic() Panicln() Panicf() With() WithField() WithFields()

func Logger

func Logger(name string) (log *CompatibleLogger)

func New added in v0.1.1

func New(name, level string, json, console, caller bool) (*CompatibleLogger, error)

New

func NewLogger added in v0.1.1

func NewLogger(name, file, level string, json, console, caller bool) (*CompatibleLogger, error)

NewLogger

func Of added in v0.1.5

func Of(name string) (log *CompatibleLogger)

func X

func X() *CompatibleLogger

func (CompatibleLogger) Debug

func (l CompatibleLogger) Debug(args ...interface{})

Debug logs a message at level Debug on the compatibleLogger.

func (CompatibleLogger) Debugf

func (l CompatibleLogger) Debugf(format string, args ...interface{})

Debugf logs a message at level Debug on the compatibleLogger.

func (CompatibleLogger) Error

func (l CompatibleLogger) Error(args ...interface{})

Error logs a message at level Error on the compatibleLogger.

func (CompatibleLogger) Errore

func (l CompatibleLogger) Errore(msg string, err error)

func (CompatibleLogger) Errorf

func (l CompatibleLogger) Errorf(format string, args ...interface{})

Errorf logs a message at level Error on the compatibleLogger.

func (CompatibleLogger) Fatal

func (l CompatibleLogger) Fatal(args ...interface{})

Fatal logs a message at level Fatal on the compatibleLogger.

func (CompatibleLogger) Fatale added in v0.1.6

func (l CompatibleLogger) Fatale(msg string, err error)

func (CompatibleLogger) Fatalf

func (l CompatibleLogger) Fatalf(format string, args ...interface{})

Fatalf logs a message at level Fatal on the compatibleLogger.

func (CompatibleLogger) Info

func (l CompatibleLogger) Info(args ...interface{})

Info logs a message at level Info on the compatibleLogger.

func (CompatibleLogger) Infof

func (l CompatibleLogger) Infof(format string, args ...interface{})

Infof logs a message at level Info on the compatibleLogger.

func (CompatibleLogger) Panic

func (l CompatibleLogger) Panic(args ...interface{})

Panic logs a message at level Painc on the compatibleLogger.

func (CompatibleLogger) Panicf

func (l CompatibleLogger) Panicf(format string, args ...interface{})

Panicf logs a message at level Painc on the compatibleLogger.

func (CompatibleLogger) Print

func (l CompatibleLogger) Print(args ...interface{})

Print logs a message at level Info on the compatibleLogger.

func (CompatibleLogger) Printf

func (l CompatibleLogger) Printf(format string, args ...interface{})

Printf logs a message at level Info on the compatibleLogger.

func (CompatibleLogger) Unwrap

func (l CompatibleLogger) Unwrap() *zap.Logger

func (CompatibleLogger) Warn

func (l CompatibleLogger) Warn(args ...interface{})

Warn logs a message at level Warn on the compatibleLogger.

func (CompatibleLogger) Warnf

func (l CompatibleLogger) Warnf(format string, args ...interface{})

Warnf logs a message at level Warn on the compatibleLogger.

func (*CompatibleLogger) With

func (l *CompatibleLogger) With(key string, value interface{}) *CompatibleLogger

With return a logger with an extra field.

func (*CompatibleLogger) WithField

func (l *CompatibleLogger) WithField(key string, value interface{}) *CompatibleLogger

WithField return a logger with an extra field.

func (*CompatibleLogger) WithFields

func (l *CompatibleLogger) WithFields(fields map[string]interface{}) *CompatibleLogger

WithFields return a logger with extra fields.

Jump to

Keyboard shortcuts

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