log

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, keyvals ...interface{})

Debug logs a message at debug level.

func Error

func Error(msg string, keyvals ...interface{})

Error logs a message at error level.

func Fatal

func Fatal(msg string, keyvals ...interface{})

Fatal logs a message at fatal level.

func Info

func Info(msg string, keyvals ...interface{})

Info logs a message at info level.

func SetKratosLogger

func SetKratosLogger(logger Logger)

func SetLogger

func SetLogger(logger Logger)

func Warn

func Warn(msg string, keyvals ...interface{})

Warn logs a message at warn level.

Types

type Logger

type Logger interface {
	Log(level configv1.Level, msg string, keyvals ...interface{})
}

func GetLogger

func GetLogger() Logger

func NewZapLogger

func NewZapLogger(opts ...Option) Logger

type Option

type Option func(*option)

func CallerDepth

func CallerDepth(d int) Option

func EnableConsole

func EnableConsole(enable bool) Option

func EncodeConfig

func EncodeConfig(config zapcore.EncoderConfig) Option

func FilenamePrefix

func FilenamePrefix(prefix string) Option

func Level

func Level(level configv1.Level) Option

func Meta

func Meta(key string, value interface{}) Option

func OnlyConsole

func OnlyConsole(only bool) Option

func OutputPath

func OutputPath(path string) Option

Jump to

Keyboard shortcuts

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