Documentation ¶
Index ¶
- Variables
- func DebugEnabled() bool
- func Debugf(format string, v ...interface{})
- func Debugln(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorln(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Warnf(format string, v ...interface{})
- type Logger
- func (l *Logger) DebugEnabled() bool
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Debugln(v ...interface{})
- func (l *Logger) EnableDebug(enabled bool)
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Errorln(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Fatalln(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
var StdLogger = New(false)
StdLogger is the logger that is used from the log functions in this package
Functions ¶
func DebugEnabled ¶
func DebugEnabled() bool
DebugEnabled returns true if the Stdlogger logs debug messages
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf logs a debug message to stdout. It's only shown if debugging is enabled.
func Debugln ¶
func Debugln(v ...interface{})
Debugln logs a debug message to stdout. It's only shown if debugging is enabled.
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf logs a message to stderr and terminates the application with an error
Types ¶
type Logger ¶ added in v0.11.1
type Logger struct {
// contains filtered or unexported fields
}
Logger logs messages
func New ¶ added in v0.11.1
New returns a new Logger that logs to Stderr. Debug messages are only printed if debugEnabled is true
func (*Logger) DebugEnabled ¶ added in v0.11.1
DebugEnabled returns true if logging debug messages is enabled
func (*Logger) Debugf ¶ added in v0.11.1
Debugf logs a debug message to stdout. It's only shown if debugging is enabled.
func (*Logger) Debugln ¶ added in v0.11.1
func (l *Logger) Debugln(v ...interface{})
Debugln logs a debug message to stdout. It's only shown if debugging is enabled.
func (*Logger) EnableDebug ¶ added in v0.11.1
EnableDebug enables/disables logging debug messages
func (*Logger) Errorln ¶ added in v0.11.1
func (l *Logger) Errorln(v ...interface{})
Errorln logs a message to stderr
func (*Logger) Fatalf ¶ added in v0.11.1
Fatalf logs a message to stderr and terminates the application with an error