log

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Log global logger

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Info

func Info(args ...interface{})

func Infof

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

func Logf

func Logf(level logrus.Level, format string, args ...interface{})

func Panic

func Panic(args ...interface{})

func Panicf

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

func Print

func Print(args ...interface{})

func Printf

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

func SetLevel

func SetLevel(level string)

SetLevel set log level

func Trace

func Trace(args ...interface{})

func Tracef

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

func Warn

func Warn(args ...interface{})

func Warnf

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

func Warning

func Warning(args ...interface{})

func Warningf

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

func WithDefaultFields

func WithDefaultFields(key string, value interface{})

WithDefaultFields add default fields to logger

Types

type Logger

type Logger struct {
	*logrus.Entry
}

Logger implements log.Logger

func LoggerWithSpan

func LoggerWithSpan(ctx context.Context) *Logger

LoggerWithSpan spwan new logger with trace span

func WithError

func WithError(err error) *Logger

WithError add error to logger

func WithField

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

func WithSpan

func WithSpan(ctx context.Context) *Logger

WithSpan add trace span to logger

func Wrap

func Wrap(logrusEntry *logrus.Entry) *Logger

Wrap wrap *logrus.Entry to log.Logger

Jump to

Keyboard shortcuts

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