Documentation ¶
Index ¶
- type JSONFormatter
- type Loggerus
- 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) 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 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 }
func NewJSONFormatter ¶
func NewJSONFormatter(timestampFormat string, timeZone string) (*JSONFormatter, error)
type Loggerus ¶
type Loggerus struct {
// contains filtered or unexported fields
}
func NewJSONLoggerus ¶
NewJSONLoggerus Creates a logger pre-configured for commands
func NewLoggerus ¶
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) 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 TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}
func NewTextFormatter ¶
func NewTextFormatter(maxVariableLen int, enrichWhoField bool) (*TextFormatter, error)