Documentation
¶
Index ¶
- func Debug(msg string, args ...interface{})
- func Error(msg string, args ...interface{})
- func Info(msg string, args ...interface{})
- func IsDebug() bool
- func IsInfo() bool
- func IsWarn() bool
- func SetField(k string, v interface{})
- func SetLevel(lvl message.Level)
- func SetLevelString(lvl string)
- func SetName(n string)
- func Warn(msg string, args ...interface{})
- type Logger
- func (l *Logger) Configure(opts ...Option) error
- func (l *Logger) Debug(msg string, args ...interface{})
- func (l *Logger) Error(msg string, args ...interface{})
- func (l *Logger) GetNamed(n string) *Logger
- func (l *Logger) Info(msg string, args ...interface{})
- func (l *Logger) IsDebug() bool
- func (l *Logger) IsInfo() bool
- func (l *Logger) IsWarn() bool
- func (l *Logger) Log(lvl message.Level, msg string, args ...interface{})
- func (l *Logger) SetField(k string, v interface{})
- func (l *Logger) SetLevel(lvl message.Level)
- func (l *Logger) SetLevelString(lvl string)
- func (l *Logger) SetName(n string)
- func (l *Logger) Warn(msg string, args ...interface{})
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDebug ¶ added in v0.3.0
func IsDebug() bool
IsDebug determines the debug status for a logger instance. Use this to conditionally execute blocks of code depending on the log verbosity.
func IsInfo ¶ added in v0.3.0
func IsInfo() bool
IsInfo determines the info status for a logger instance. Use this to conditionally execute blocks of code depending on the log verbosity.
func IsWarn ¶ added in v0.3.0
func IsWarn() bool
IsWarn determines the info status for a logger instance. Use this to conditionally execute blocks of code depending on the log verbosity.
func SetField ¶ added in v0.3.0
func SetField(k string, v interface{})
SetField enables changing the default fields for a logger instance.
func SetLevelString ¶ added in v0.3.0
func SetLevelString(lvl string)
SetLevelString enables changing the minimum level for a logger instance.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a simple levelled logger.
func (*Logger) GetNamed ¶ added in v0.3.0
GetNamed creates a new instance of a logger with a new name.
func (*Logger) IsDebug ¶
IsDebug determines the debug status for a logger instance. Use this to conditionally execute blocks of code depending on the log verbosity.
func (*Logger) IsInfo ¶
IsInfo determines the info status for a logger instance. Use this to conditionally execute blocks of code depending on the log verbosity.
func (*Logger) IsWarn ¶
IsWarn determines the info status for a logger instance. Use this to conditionally execute blocks of code depending on the log verbosity.
func (*Logger) SetField ¶ added in v0.3.0
SetField enables changing the default fields for a logger instance.
func (*Logger) SetLevel ¶ added in v0.3.0
SetLevel enables changing the minimum level for a logger instance.
func (*Logger) SetLevelString ¶ added in v0.3.0
SetLevelString enables changing the minimum level for a logger instance.
type Option ¶ added in v0.3.0
An Option configures a logger
func LevelString ¶ added in v0.3.0
LevelString configures the minimum level to log.