Documentation
¶
Index ¶
- type JSONFormatter
- type Loggerus
- func NewJSONLoggerus(name string, level logrus.Level, output io.Writer) (*Loggerus, error)
- func NewLoggerus(name string, level logrus.Level, output io.Writer, formatter logrus.Formatter) (*Loggerus, error)
- func NewLoggerusForTests(name string) (*Loggerus, error)
- func NewTextLoggerus(name string, level logrus.Level, output io.Writer, enrichWhoField bool, ...) (*Loggerus, error)
- func (l *Loggerus) Debug(format interface{}, vars ...interface{})
- func (l *Loggerus) DebugCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) DebugWith(format interface{}, vars ...interface{})
- func (l *Loggerus) DebugWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) Error(format interface{}, vars ...interface{})
- func (l *Loggerus) ErrorCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) ErrorWith(format interface{}, vars ...interface{})
- func (l *Loggerus) ErrorWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) Flush()
- func (l *Loggerus) GetChild(name string) logger.Logger
- func (l *Loggerus) GetLogrus() *logrus.Logger
- func (l *Loggerus) GetOutput() io.Writer
- func (l *Loggerus) GetRedactor() *Redactor
- func (l *Loggerus) Info(format interface{}, vars ...interface{})
- func (l *Loggerus) InfoCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) InfoWith(format interface{}, vars ...interface{})
- func (l *Loggerus) InfoWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) Warn(format interface{}, vars ...interface{})
- func (l *Loggerus) WarnCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (l *Loggerus) WarnWith(format interface{}, vars ...interface{})
- func (l *Loggerus) WarnWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- type MuxLogger
- func (ml *MuxLogger) Debug(format interface{}, vars ...interface{})
- func (ml *MuxLogger) DebugCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) DebugWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) DebugWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) Error(format interface{}, vars ...interface{})
- func (ml *MuxLogger) ErrorCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) ErrorWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) ErrorWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) Flush()
- func (ml *MuxLogger) GetChild(name string) logger.Logger
- func (ml *MuxLogger) GetLoggers() []logger.Logger
- func (ml *MuxLogger) Info(format interface{}, vars ...interface{})
- func (ml *MuxLogger) InfoCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) InfoWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) InfoWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) SetLoggers(loggers ...logger.Logger)
- func (ml *MuxLogger) Warn(format interface{}, vars ...interface{})
- func (ml *MuxLogger) WarnCtx(ctx context.Context, format interface{}, vars ...interface{})
- func (ml *MuxLogger) WarnWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) WarnWithCtx(ctx context.Context, format interface{}, vars ...interface{})
- type RedactingLogger
- type Redactor
- func (r *Redactor) AddRedactions(redactions []string)
- func (r *Redactor) AddValueRedactions(valueRedactions []string)
- func (r *Redactor) Disable()
- func (r *Redactor) Enable()
- func (r *Redactor) GetOutput() io.Writer
- func (r *Redactor) GetRedactions() []string
- func (r *Redactor) Write(p []byte) (n int, err error)
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONFormatter ¶
type JSONFormatter struct {
// Log time zone
TimeZone string
// contains filtered or unexported fields
}
type Loggerus ¶
type Loggerus struct {
// contains filtered or unexported fields
}
func NewJSONLoggerus ¶
Creates a logger pre-configured for commands
func NewLoggerus ¶
func NewLoggerusForTests ¶
func NewTextLoggerus ¶
func (*Loggerus) Debug ¶
func (l *Loggerus) Debug(format interface{}, vars ...interface{})
Debug emits an unstructured debug log
func (*Loggerus) DebugWith ¶
func (l *Loggerus) DebugWith(format interface{}, vars ...interface{})
DebugWith emits a structured debug log
func (*Loggerus) DebugWithCtx ¶
DebugWithCtx emits a structured debug log with context
func (*Loggerus) Error ¶
func (l *Loggerus) Error(format interface{}, vars ...interface{})
Error emits an unstructured error log
func (*Loggerus) ErrorWith ¶
func (l *Loggerus) ErrorWith(format interface{}, vars ...interface{})
ErrorWith emits a structured error log
func (*Loggerus) ErrorWithCtx ¶
ErrorWithCtx emits a structured error log with context
func (*Loggerus) GetChild ¶
GetChild returns a child logger, if underlying logger supports hierarchal logging
func (*Loggerus) GetRedactor ¶
func (*Loggerus) Info ¶
func (l *Loggerus) Info(format interface{}, vars ...interface{})
Info emits an unstructured informational log
func (*Loggerus) InfoWith ¶
func (l *Loggerus) InfoWith(format interface{}, vars ...interface{})
InfoWith emits a structured info log
func (*Loggerus) InfoWithCtx ¶
InfoWithCtx emits a structured info log with context
func (*Loggerus) Warn ¶
func (l *Loggerus) Warn(format interface{}, vars ...interface{})
Warn emits an unstructured warning log
func (*Loggerus) WarnWith ¶
func (l *Loggerus) WarnWith(format interface{}, vars ...interface{})
WarnWith emits a structured warning log
func (*Loggerus) WarnWithCtx ¶
WarnWithCtx emits a structured warning log with context
type MuxLogger ¶
type MuxLogger struct {
// contains filtered or unexported fields
}
a logger that multiplexes logs towards multiple loggers
func (*MuxLogger) DebugWith ¶
func (ml *MuxLogger) DebugWith(format interface{}, vars ...interface{})
func (*MuxLogger) DebugWithCtx ¶
func (*MuxLogger) ErrorWith ¶
func (ml *MuxLogger) ErrorWith(format interface{}, vars ...interface{})
func (*MuxLogger) ErrorWithCtx ¶
func (*MuxLogger) GetLoggers ¶
func (*MuxLogger) InfoWithCtx ¶
func (*MuxLogger) SetLoggers ¶
func (*MuxLogger) WarnWithCtx ¶
type RedactingLogger ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
func NewRedactor ¶
func (*Redactor) AddRedactions ¶
func (*Redactor) AddValueRedactions ¶
func (*Redactor) GetRedactions ¶
type TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}