Documentation ¶
Index ¶
- func Accessf(s string, args ...interface{})
- func Close()
- func DebugStack()
- func Debugf(s string, args ...interface{})
- func Errorf(s string, args ...interface{})
- func Fatalf(s string, args ...interface{})
- func Importantf(s string, args ...interface{})
- func Infof(s string, args ...interface{})
- func Install(l Logger)
- func Warnf(s string, args ...interface{})
- type DefaultLogger
- type Filter
- type Hook
- func (lh *Hook) Accessf(s string, args ...interface{})
- func (lh *Hook) Debugf(s string, args ...interface{})
- func (lh *Hook) Errorf(s string, args ...interface{})
- func (lh *Hook) Fatalf(s string, args ...interface{})
- func (lh *Hook) Importantf(s string, args ...interface{})
- func (lh *Hook) Infof(s string, args ...interface{})
- func (lh *Hook) Warnf(s string, args ...interface{})
- type Logger
- type MultiWriter
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accessf ¶
func Accessf(s string, args ...interface{})
Accessf logs a access entry to the installed logger
func DebugStack ¶
func DebugStack()
func Debugf ¶
func Debugf(s string, args ...interface{})
Debugf logs a debug entry to the installed logger
func Errorf ¶
func Errorf(s string, args ...interface{})
Errorf logs an error entry to the installed logger
func Fatalf ¶
func Fatalf(s string, args ...interface{})
Fatalf logs a fatal entry to the installed logger and panics
func Importantf ¶
func Importantf(s string, args ...interface{})
Warnf logs a warn entry to the installed logger
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger is the default Logger implementation based on one Writer
func NewDefaultLogger ¶
func NewDefaultLogger(name string, w Writer) *DefaultLogger
NewDefaultLogger creates a new StdLogger
func (*DefaultLogger) Close ¶
func (l *DefaultLogger) Close()
Close closes the writer associated with the logger
func (*DefaultLogger) Log ¶
func (l *DefaultLogger) Log(e entry.Entry)
Log logs writes an entry to the associated logger
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is a writer midlleware for a log-chain
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook specifies a func, which is called before a log-entry is passed to the next writer - mostly used for amending logs entries with additional information
func ComponentHook ¶
ComponentHook creates a new hook, which modifies the component field of a log entry
func (*Hook) Importantf ¶
Importantf logs an important entry
type MultiWriter ¶
type MultiWriter struct {
// contains filtered or unexported fields
}
MultiWriter implements the Writer interface it provides a logger middleware which writes to multiple next writers
func NewMultiWriter ¶
func NewMultiWriter(targets ...Writer) *MultiWriter
NewMultiWriter creates a new MultiWriter
func (*MultiWriter) Close ¶
func (mw *MultiWriter) Close()
Close closes the writer and all related resources
func (*MultiWriter) Write ¶
func (mw *MultiWriter) Write(e entry.Entry)
Write writes an entry to all installed targets