Documentation
¶
Index ¶
- Constants
- func SetLevelFromEnv()
- type FieldLogr
- type Logr
- func (l *Logr) Debug(args ...interface{})
- func (l *Logr) DebugObject(name string, object interface{})
- func (l *Logr) Debugf(format string, args ...interface{})
- func (l *Logr) Error(args ...interface{})
- func (l *Logr) Errorf(format string, args ...interface{})
- func (l *Logr) Info(args ...interface{})
- func (l *Logr) Infof(format string, args ...interface{})
- func (l *Logr) LogErrorToTrace(level, msg string)
- func (l *Logr) LogToTrace(level, msg string)
- func (l *Logr) Print(args ...interface{})
- func (l *Logr) Printf(format string, args ...interface{})
- func (l *Logr) Warn(args ...interface{})
- func (l *Logr) Warnf(format string, args ...interface{})
- func (l *Logr) Warning(args ...interface{})
- func (l *Logr) Warningf(format string, args ...interface{})
Constants ¶
View Source
const TraceKey = "traceId"
Variables ¶
This section is empty.
Functions ¶
func SetLevelFromEnv ¶
func SetLevelFromEnv()
SetLevelFromEnv is a convienience function to set the log level from env vars such as those on Kubernetes or Docker hosts
Types ¶
type FieldLogr ¶
type FieldLogr interface {
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Printf(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{})
Print(args ...interface{})
Warn(args ...interface{})
Warning(args ...interface{})
Error(args ...interface{})
Fatal(args ...interface{})
Panic(args ...interface{})
}
type Logr ¶
type Logr struct {
Logger FieldLogr
// contains filtered or unexported fields
}
func (*Logr) DebugObject ¶
func (*Logr) LogErrorToTrace ¶
LogErrorToTrace logs the msg to the tracing span with the level
func (*Logr) LogToTrace ¶
LogToTrace logs the msg to the tracing span with the level
Click to show internal directories.
Click to hide internal directories.