Documentation
¶
Index ¶
- Constants
- func ContextWithLogger(ctx context.Context, logger *Logger) context.Context
- func DPanic(msg string)
- func DPanicf(template string, args ...interface{})
- func Debug(msg string)
- func Debugf(template string, args ...interface{})
- func Error(msg string)
- func Errorf(template string, args ...interface{})
- func Fatal(msg string)
- func Fatalf(template string, args ...interface{})
- func Info(msg string)
- func Infof(template string, args ...interface{})
- func InitLogger(config Config)
- func L() *zap.Logger
- func Panic(msg string)
- func Panicf(template string, args ...interface{})
- func ReplaceGlobals(logger *zap.Logger) func()
- func S() *zap.SugaredLogger
- func SetGlobalConfig(config Config) func()
- func Sync() error
- func Warn(msg string)
- func Warnf(template string, args ...interface{})
- 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)
func ReplaceGlobals ¶ added in v0.19.2
func S ¶ added in v0.19.2
func S() *zap.SugaredLogger
func SetGlobalConfig ¶ added in v0.19.2
func SetGlobalConfig(config Config) func()
Types ¶
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.