Documentation ¶
Index ¶
- func Debugf(format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func Log() *logrus.Logger
- func SetLogLevel(logLevel string) error
- func Tracef(format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type LogContext
- func (logctx *LogContext) AddField(key string, value interface{}) *LogContext
- func (logctx *LogContext) Debugf(format string, args ...interface{})
- func (logctx *LogContext) Errorf(format string, args ...interface{})
- func (logctx *LogContext) Fatalf(format string, args ...interface{})
- func (logctx *LogContext) Infof(format string, args ...interface{})
- func (logctx *LogContext) Tracef(format string, args ...interface{})
- func (logctx *LogContext) Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a warning message without context to stdout
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs an error message without context to stderr
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a non-recoverable error message without context to stderr
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a warning message without context to stdout
func SetLogLevel ¶
SetLogLevel sets the log level to use for the logger
Types ¶
type LogContext ¶
type LogContext struct {
// contains filtered or unexported fields
}
LogContext contains a structured context for logging
func NewContext ¶
func NewContext() *LogContext
NewContext returns a LogContext with default settings
func (*LogContext) AddField ¶
func (logctx *LogContext) AddField(key string, value interface{}) *LogContext
AddField adds a structured field to logctx
func (*LogContext) Debugf ¶
func (logctx *LogContext) Debugf(format string, args ...interface{})
Debugf logs a debug message for logctx to stdout
func (*LogContext) Errorf ¶
func (logctx *LogContext) Errorf(format string, args ...interface{})
Errorf logs a non-fatal error message for logctx to stdout
func (*LogContext) Fatalf ¶
func (logctx *LogContext) Fatalf(format string, args ...interface{})
Fatalf logs a fatal error message for logctx to stdout
func (*LogContext) Infof ¶
func (logctx *LogContext) Infof(format string, args ...interface{})
Infof logs an informational message for logctx to stdout
func (*LogContext) Tracef ¶
func (logctx *LogContext) Tracef(format string, args ...interface{})
Tracef logs a debug message for logctx to stdout
func (*LogContext) Warnf ¶
func (logctx *LogContext) Warnf(format string, args ...interface{})
Warnf logs a warning message for logctx to stdout