Documentation ¶
Index ¶
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
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger logs messages
func New ¶
New returns a new Logger that logs to Stderr. Debug messages are only printed if debugEnabled is true
func (*Logger) DebugEnabled ¶
DebugEnabled returns true if logging debug messages is enabled
func (*Logger) Debugf ¶
Debugf logs a debug message to stdout. It's only shown if debugging is enabled.
func (*Logger) Debugln ¶
func (l *Logger) Debugln(v ...interface{})
Debugln logs a debug message to stdout. It's only shown if debugging is enabled.
func (*Logger) EnableDebug ¶
EnableDebug enables/disables logging debug messages
type Output ¶
type Output interface { Printf(format string, v ...interface{}) Println(v ...interface{}) }
Output defines the output channel of a logger to that all log messages are written.
type TestLogOutput ¶
type TestLogOutput struct {
// contains filtered or unexported fields
}
func NewTestLogOutput ¶
func NewTestLogOutput(t *testing.T) *TestLogOutput
NewTestLogOutput wraps the logger of testing.T to provide the Output interface.
func (*TestLogOutput) Printf ¶
func (l *TestLogOutput) Printf(format string, v ...interface{})
func (*TestLogOutput) Println ¶
func (l *TestLogOutput) Println(v ...interface{})