logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: Apache-2.0, MIT Imports: 6 Imported by: 71

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CDebug

func CDebug(ctx context.Context, msg ...interface{})

func CDebugf

func CDebugf(ctx context.Context, msgfmt string, args ...interface{})

func CError

func CError(ctx context.Context, msg ...interface{})

func CErrorf

func CErrorf(ctx context.Context, msgfmt string, args ...interface{})

func CInfo

func CInfo(ctx context.Context, msg ...interface{})

func CInfof

func CInfof(ctx context.Context, msgfmt string, args ...interface{})

func CWarn

func CWarn(ctx context.Context, msg ...interface{})

func CWarnf

func CWarnf(ctx context.Context, msgfmt string, args ...interface{})

func Debug

func Debug(msg ...interface{})

func Debugf

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

func Error

func Error(msg ...interface{})

func Errorf

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

func Info

func Info(msg ...interface{})

func Infof

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

func Set

func SetLevel

func SetLevel(name string) error

func Warn

func Warn(msg ...interface{})

func Warnf

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

Types

type LogContext

type LogContext interface {
	NewContext(key, value string) LogContext

	Info(msg ...interface{})
	Debug(msg ...interface{})
	Warn(msg ...interface{})
	Error(msg ...interface{})

	Infof(msgfmt string, args ...interface{})
	Debugf(msgfmt string, args ...interface{})
	Warnf(msgfmt string, args ...interface{})
	Errorf(msgfmt string, args ...interface{})
}

func Get

func Get(ctx context.Context) LogContext

func New

func New() LogContext

func NewContext

func NewContext(key, value string) LogContext

func WithLogger

func WithLogger(ctx context.Context, key, value string) (context.Context, LogContext)

Jump to

Keyboard shortcuts

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