Documentation
¶
Index ¶
Constants ¶
View Source
const ( DEBUG = 100 INFO = 200 NOTICE = 250 WARNING = 300 ERROR = 400 CRITICAL = 500 ALERT = 550 EMERGENCY = 600 )
log levels
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FormattableHandler ¶
type FormattableHandler interface { // Sets the formatter. SetFormatter(formatter *Formatter) *IHandler // Gets the formatter. GetFormatter() *Formatter }
FormattableHandler Interface to describe loggers that have a formatter
type Formatter ¶
type Formatter interface { // Format formats a log record. Format(record *Record) error // FormatBatch formats a set of log records. FormatBatch(records []*Record) error }
Formatter interface fromatter
type IHandler ¶
type IHandler interface { // Checks whether the given record will be handled by this handler. IsHandling(record *Record) bool // Handles a record. Handle(record *Record) bool // Handles a set of records at once. HandleBatch(records []*Record) // Closes the handler. Close() }
IHandler Interface of the Handler.
type ProcessableHandler ¶
type ProcessableHandler interface { // Adds a processor in the stack. PushProcessor() *IHandler // Removes the processor on top of the stack and returns it. PopProcessor() }
ProcessableHandler Interface to describe loggers that have processors
Click to show internal directories.
Click to hide internal directories.