Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hook ¶
Hook is a generic logging hook... Stolen from the logrus
type Logger ¶
type Logger interface { Errorf(string, ...interface{}) Warningf(string, ...interface{}) Infof(string, ...interface{}) Debugf(string, ...interface{}) }
Logger is a basic logger
var Discard Logger = &discardLogger{}
Discard an logs sent to this logger
func NewMaybeLogger ¶
NewMaybeLogger creates a new logger from an existing one that can safely be nil without panicing
type MaybeLogger ¶
type MaybeLogger struct {
// contains filtered or unexported fields
}
MaybeLogger is a logger that can hold a nil logger internally
func (*MaybeLogger) Debugf ¶
func (ml *MaybeLogger) Debugf(s string, v ...interface{})
Debugf reports debugging info
func (*MaybeLogger) Errorf ¶
func (ml *MaybeLogger) Errorf(s string, v ...interface{})
Errorf reports an error
func (*MaybeLogger) Infof ¶
func (ml *MaybeLogger) Infof(s string, v ...interface{})
Infof reports info
func (*MaybeLogger) Warningf ¶
func (ml *MaybeLogger) Warningf(s string, v ...interface{})
Warningf reports a warning
type PrefixedFormatter ¶
PrefixedFormatter is a logging text formatter that logs with a prefix
type SilentFormatter ¶
type SilentFormatter struct{}
SilentFormatter is a logrus formatter that does nothing
Click to show internal directories.
Click to hide internal directories.