Versions in this module Expand all Collapse all v1 v1.6.7 Feb 27, 2018 Changes in this version + var LevelNames = map[Level]string + func DefaultFormatter(l *Logger, e *Entry) string + func GetCallStack(skip int, frames int, filter string) (CallStack, sf string) + type ConsoleTarget struct + ColorMode bool + Writer io.Writer + func NewConsoleTarget() *ConsoleTarget + func (t *ConsoleTarget) Close() + func (t *ConsoleTarget) Open(io.Writer) error + func (t *ConsoleTarget) Process(e *Entry) + type Entry struct + CallStack string + Category string + FormattedMessage string + Level Level + Message string + ShortFile string + Time time.Time + func (e *Entry) String() string + type FileTarget struct + BackupCount int + FileName string + MaxBytes int64 + Rotate bool + func NewFileTarget() *FileTarget + func (t *FileTarget) Close() + func (t *FileTarget) Open(errWriter io.Writer) error + func (t *FileTarget) Process(e *Entry) + type Filter struct + Categories []string + MaxLevel Level + MinLevel Level + func (t *Filter) Allow(e *Entry) bool + func (t *Filter) Init() + type Formatter func(*Logger, *Entry) string + type Level int + const LevelAlert + const LevelCritical + const LevelDebug + const LevelEmergency + const LevelError + const LevelInfo + const LevelNotice + const LevelWarning + func (l Level) String() string + type Logger struct + Category string + Formatter Formatter + func NewLogger() *Logger + func (l *Logger) Alert(format string, a ...interface{}) + func (l *Logger) Critical(format string, a ...interface{}) + func (l *Logger) Debug(format string, a ...interface{}) + func (l *Logger) Emergency(format string, a ...interface{}) + func (l *Logger) Error(format string, a ...interface{}) + func (l *Logger) GetLogger(category string, formatter ...Formatter) *Logger + func (l *Logger) Info(format string, a ...interface{}) + func (l *Logger) Log(level Level, format string, a ...interface{}) + func (l *Logger) Notice(format string, a ...interface{}) + func (l *Logger) Warning(format string, a ...interface{}) + func (l Logger) Close() + func (l Logger) Open() error + type MailTarget struct + BufferSize int + Host string + Password string + Recipients []string + Sender string + Subject string + Username string + func NewMailTarget() *MailTarget + func (t *MailTarget) Close() + func (t *MailTarget) Open(errWriter io.Writer) error + func (t *MailTarget) Process(e *Entry) + type NetworkTarget struct + Address string + BufferSize int + Network string + Persistent bool + func NewNetworkTarget() *NetworkTarget + func (t *NetworkTarget) Close() + func (t *NetworkTarget) Open(errWriter io.Writer) error + func (t *NetworkTarget) Process(e *Entry) + type Target interface + Close func() + Open func(errWriter io.Writer) error + Process func(*Entry)