logger

package
v0.0.0-...-5952180 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields map[string]interface{}

type Level

type Level int8
const (
	LevelDebug Level = iota
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
	LevelPanic
)

func (Level) String

func (l Level) String() string

type Logger

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

func NewLogger

func NewLogger(w io.Writer, prefix string, flag int) *Logger

func (*Logger) Debug

func (l *Logger) Debug(ctx context.Context, v ...interface{})

func (*Logger) Debugf

func (l *Logger) Debugf(ctx context.Context, format string, v ...interface{})

func (*Logger) Error

func (l *Logger) Error(ctx context.Context, v ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(ctx context.Context, format string, v ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(ctx context.Context, v ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(ctx context.Context, format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(ctx context.Context, v ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(ctx context.Context, format string, v ...interface{})

func (*Logger) JSONFormat

func (l *Logger) JSONFormat(message string) map[string]interface{}

func (*Logger) Output

func (l *Logger) Output(message string)

func (*Logger) Panic

func (l *Logger) Panic(ctx context.Context, v ...interface{})

func (*Logger) Panicf

func (l *Logger) Panicf(ctx context.Context, format string, v ...interface{})

func (*Logger) WithCaller

func (l *Logger) WithCaller(skip int) *Logger

func (*Logger) WithCallersFrames

func (l *Logger) WithCallersFrames() *Logger

func (*Logger) WithContext

func (l *Logger) WithContext(ctx context.Context) *Logger

func (*Logger) WithFields

func (l *Logger) WithFields(f Fields) *Logger

func (*Logger) WithLevel

func (l *Logger) WithLevel(lvl Level) *Logger

func (*Logger) WithTrace

func (l *Logger) WithTrace() *Logger

Jump to

Keyboard shortcuts

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