Documentation ¶
Index ¶
- func CheckWrite(lvl Level, msg string, fields ...Field)
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func SetDefaultField(key string, value interface{})
- func SetDefaultService(value string)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- type Field
- type Fields
- type Level
- type Logger
- func Base() Logger
- func NewSampleLogger(tick time.Duration, first, thereafter int) Logger
- func Nop() Logger
- func OnlyWithTracing(ctx context.Context) Logger
- func WithClientID(ctx context.Context) Logger
- func WithError(err error) Logger
- func WithField(key string, value interface{}) Logger
- func WithFields(fields Fields) Logger
- func WithTracing(ctx context.Context) Logger
- func WithUserID(ctx context.Context) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckWrite ¶
func SetDefaultField ¶ added in v2.2.5
func SetDefaultField(key string, value interface{})
func SetDefaultService ¶ added in v2.2.5
func SetDefaultService(value string)
Types ¶
type Logger ¶
type Logger interface { WithClientID(ctx context.Context) Logger WithField(key string, value interface{}) Logger WithFields(fields Fields) Logger WithError(err error) Logger WithTracing(ctx context.Context) Logger WithUserID(ctx context.Context) Logger OnlyWithTracing(ctx context.Context) Logger Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Warning(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) CheckWrite(lvl Level, msg string, fields ...Field) Sync() error }
func NewSampleLogger ¶ added in v2.4.0
NewSampleLogger will create a new logger which will sample logs and dropped if requested to often Logs which is written within `tick` be applied by first and thereafter `first` is amount of logs that will always will be outputted `thereafter` is used for outputten every n after within the `tick`
func OnlyWithTracing ¶ added in v2.32.1
func WithClientID ¶ added in v2.25.1
func WithFields ¶
func WithTracing ¶
WithTracing will take an OpenCensus trace and add log fields for Datadog.
func WithUserID ¶
Click to show internal directories.
Click to hide internal directories.