Documentation ¶
Index ¶
- func AsyncDiscard() chan<- *Entry
- func AsyncLogger() (chan<- *Entry, chan bool)
- type Context
- func (c Context) Debug(s string, v ...interface{}) *Entry
- func (c Context) Error(s string, v ...interface{}) *Entry
- func (c Context) Fatal(s string, v ...interface{}) *Entry
- func (c Context) Info(s string, v ...interface{}) *Entry
- func (c Context) Notify(l Level, s string, v ...interface{}) *Entry
- func (c Context) Warn(s string, v ...interface{}) *Entry
- func (c Context) WithError(err error) Context
- func (c Context) WithExtra(name string, value interface{}) Context
- func (c Context) WithField(name string, value interface{}) Context
- func (c Context) WithFields(f Fields) Context
- type Entry
- type Fields
- type Level
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncLogger ¶
AsyncLogger receives notification entries from a channel and logs them
Types ¶
type Context ¶
Context holds stateful information for notifications
func WithFields ¶
WithFields creates a new context with multiple fields
func (Context) WithFields ¶
WithFields extends the current context with multiple fields
type Level ¶
type Level uint32
Level is the notification level
const ( // LevelDebug is for development notifications LevelDebug Level = iota // LevelInfo is for notifictions which are non-critical LevelInfo // LevelWarn is for notifications which may be troublesome LevelWarn // LevelError is for notifications which is crtical LevelError // LevelFatal is for notifications which are fatal LevelFatal )
func (Level) MarshalJSON ¶
MarshalJSON returns the notification level as a string
Click to show internal directories.
Click to hide internal directories.