Documentation ¶
Index ¶
- Variables
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Debugw(keyvals ...interface{})
- func Error(a ...interface{})
- func Errorf(format string, a ...interface{})
- func Errorw(keyvals ...interface{})
- func Fatal(a ...interface{})
- func Fatalf(format string, a ...interface{})
- func Fatalw(keyvals ...interface{})
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func Infow(keyvals ...interface{})
- func Log(level Level, keyvals ...interface{})
- func NewWriter(l Logger, ops ...WriterOption) io.Writer
- func SetGlobal(l Logger)
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- func Warnw(keyvals ...interface{})
- type Helper
- func (h *Helper) Debug(a ...interface{})
- func (h *Helper) Debugf(format string, a ...interface{})
- func (h *Helper) Debugw(keyvals ...interface{})
- func (h *Helper) Error(a ...interface{})
- func (h *Helper) Errorf(format string, a ...interface{})
- func (h *Helper) Errorw(keyvals ...interface{})
- func (h *Helper) Fatal(a ...interface{})
- func (h *Helper) Fatalf(format string, a ...interface{})
- func (h *Helper) Fatalw(keyvals ...interface{})
- func (h *Helper) Info(a ...interface{})
- func (h *Helper) Infof(format string, a ...interface{})
- func (h *Helper) Infow(keyvals ...interface{})
- func (h *Helper) Log(level Level, keyvals ...interface{})
- func (h *Helper) Warn(a ...interface{})
- func (h *Helper) Warnf(format string, a ...interface{})
- func (h *Helper) Warnw(keyvals ...interface{})
- func (h *Helper) WithContext(ctx context.Context) *Helper
- type HelperOption
- type Level
- type Logger
- type Valuer
- type WriterOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultCaller = Caller(4) DefaultTimestamp = Timestamp(time.RFC3339) )
View Source
var DefaultMessageKey = "msg"
Functions ¶
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func NewHelper ¶
func NewHelper(logger Logger, options ...HelperOption) *Helper
type HelperOption ¶
type HelperOption func(helper *Helper)
func WithHelperMessageKey ¶
func WithHelperMessageKey(msgKey string) HelperOption
type Logger ¶
func WithContext ¶
WithContext return a shadow copy of logger with a new context
func WithFields ¶
WithFields add new fields to the logger
type WriterOption ¶
type WriterOption func(*writer)
func WithWriterLevel ¶
func WithWriterLevel(level Level) WriterOption
func WithWriterMessageKey ¶
func WithWriterMessageKey(msgKey string) WriterOption
Click to show internal directories.
Click to hide internal directories.