Documentation ¶
Index ¶
- Constants
- func ContextWithLogger(ctx context.Context, logger *Logger) context.Context
- func InitLogger(config Config)
- func Sync() error
- type Config
- type Field
- type Logger
- func (l *Logger) DPanic(msg string)
- func (l *Logger) DPanicf(template string, args ...interface{})
- func (l *Logger) Debug(msg string)
- func (l *Logger) Debugf(template string, args ...interface{})
- func (l *Logger) Error(msg string)
- func (l *Logger) Errorf(template string, args ...interface{})
- func (l *Logger) Fatal(msg string)
- func (l *Logger) Fatalf(template string, args ...interface{})
- func (l *Logger) Info(msg string)
- func (l *Logger) Infof(template string, args ...interface{})
- func (l *Logger) IsDebugEnabled() bool
- func (l *Logger) Panic(msg string)
- func (l *Logger) Panicf(template string, args ...interface{})
- func (l *Logger) Warn(msg string)
- func (l *Logger) Warnf(template string, args ...interface{})
- func (l *Logger) WithFields(fields ...zap.Field) *Logger
Constants ¶
View Source
const (
ConsoleEncode = "console"
)
View Source
const (
RequestIDKey = "request_id"
)
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶
func InitLogger ¶
func InitLogger(config Config)
Types ¶
type Config ¶
func DefaultConfig ¶
func DefaultConfig() Config
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func GetLoggerFromContext ¶
func (*Logger) IsDebugEnabled ¶ added in v0.15.1
Click to show internal directories.
Click to hide internal directories.