log

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ERROR = iota
	WARN
	INFO
	DEBUG
	TRACE
)

Variables

View Source
var (

	// Logfmt logger
	KitLogger = kitLog.NewNopLogger()
)

Functions

func CheckFatal added in v1.2.0

func CheckFatal(location string, err error)

CheckFatal prints an error and exits with error code 1 if err is non-nil.

func Debug

func Debug(args ...interface{})

func DebugWithTrace added in v1.2.0

func DebugWithTrace(ctx context.Context, args ...interface{})

func Debugf

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

func Error

func Error(err error, args ...interface{})

func ErrorWithTrace added in v1.2.0

func ErrorWithTrace(ctx context.Context, args ...interface{})

func Errorf

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

func Fatal

func Fatal(v ...interface{})

Wrapper for log.Fatal

func Fatalf

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

Wrapper for log.Fatalf

func Info

func Info(args ...interface{})

func InfoWithTrace added in v1.2.0

func InfoWithTrace(ctx context.Context, args ...interface{})

func Infof

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

func InitLogfmtLogger added in v1.2.0

func InitLogfmtLogger()

InitLogfmtLogger initialises the global gokit logger and overrides the default logger for the server.

func IsDebug

func IsDebug() bool

func IsError

func IsError() bool

func IsInfo

func IsInfo() bool

func IsTrace

func IsTrace() bool

func IsWarn

func IsWarn() bool

func LevelFilter added in v1.2.0

func LevelFilter(l int) level.Option

func SetLevel

func SetLevel(level int)

Set the level of the default logger

func Trace

func Trace(args ...interface{})

func Tracef

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

TODO: remove format methods

func Warn

func Warn(args ...interface{})

func WarnWithTrace added in v1.2.0

func WarnWithTrace(ctx context.Context, args ...interface{})

func Warnf

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

Types

type Logger

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

func (*Logger) Debug

func (logger *Logger) Debug(args ...interface{})

func (*Logger) Debugf

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

func (*Logger) Error

func (logger *Logger) Error(err error, args ...interface{})

func (*Logger) Errorf

func (logger *Logger) Errorf(err error, format string, args ...interface{})

func (*Logger) Info

func (logger *Logger) Info(args ...interface{})

func (*Logger) Infof

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

func (*Logger) IsDebug

func (logger *Logger) IsDebug() bool

func (*Logger) IsError

func (logger *Logger) IsError() bool

func (*Logger) IsInfo

func (logger *Logger) IsInfo() bool

func (*Logger) IsTrace

func (logger *Logger) IsTrace() bool

func (*Logger) IsWarn

func (logger *Logger) IsWarn() bool

func (*Logger) SetLevel

func (logger *Logger) SetLevel(level int)

Set the level of the logger

func (*Logger) Trace

func (logger *Logger) Trace(args ...interface{})

func (*Logger) Tracef

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

func (*Logger) Warn

func (logger *Logger) Warn(args ...interface{})

func (*Logger) Warnf

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

Jump to

Keyboard shortcuts

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