Documentation
¶
Index ¶
- func CtxDebug(ctx context.Context, format string, v ...interface{})
- func CtxError(ctx context.Context, format string, v ...interface{})
- func CtxFatal(ctx context.Context, format string, v ...interface{})
- func CtxInfo(ctx context.Context, format string, v ...interface{})
- func CtxWarn(ctx context.Context, format string, v ...interface{})
- func Debug(format string, v ...interface{})
- func Error(format string, v ...interface{})
- func Fatal(format string, v ...interface{})
- func GetLogID(ctx context.Context) string
- func Info(format string, v ...interface{})
- func NewLogID() string
- func SetLogID(ctx context.Context, logID string) context.Context
- func SetLogLevel(level LogLevel)
- func SetLogger(l Logger)
- func Warn(format string, v ...interface{})
- type LogIDProvider
- type LogLevel
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogLevel ¶
func SetLogLevel(level LogLevel)
SetLogLevel sets the level of logs below which logs will not be output. The default log level is LevelInfo. Note that this method is not concurrent-safe.
Types ¶
type LogIDProvider ¶
type Logger ¶
type Logger interface { LogIDProvider SetLevel(level LogLevel) GetLevel() LogLevel Debug(format string, v ...interface{}) Info(format string, v ...interface{}) Warn(format string, v ...interface{}) Error(format string, v ...interface{}) Fatal(format string, v ...interface{}) CtxDebug(ctx context.Context, format string, v ...interface{}) CtxInfo(ctx context.Context, format string, v ...interface{}) CtxWarn(ctx context.Context, format string, v ...interface{}) CtxError(ctx context.Context, format string, v ...interface{}) CtxFatal(ctx context.Context, format string, v ...interface{}) Flush() }
Logger Interface for logging
func DefaultLogger ¶
func DefaultLogger() Logger
Click to show internal directories.
Click to hide internal directories.