Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BufSize uint = 8192
Set graylog.BufSize = <value> _before_ calling NewGraylogHook Once the buffer is full, logging will start blocking, waiting for slots to be available in the queue.
Functions ¶
This section is empty.
Types ¶
type GraylogHook ¶
type GraylogHook struct { Facility string Extra map[string]interface{} // contains filtered or unexported fields }
GraylogHook to send logs to a logging service compatible with the Graylog API and the GELF format.
func NewGraylogHook ¶
func NewGraylogHook(addr string, facility string, extra map[string]interface{}) *GraylogHook
NewGraylogHook creates a hook to be added to an instance of logger.
func (*GraylogHook) Fire ¶
func (hook *GraylogHook) Fire(entry *logrus.Entry) error
Fire is called when a log event is fired. We assume the entry will be altered by another hook, otherwise we might logging something wrong to Graylog
func (*GraylogHook) Levels ¶
func (hook *GraylogHook) Levels() []logrus.Level
Levels returns the available logging levels.
Click to show internal directories.
Click to hide internal directories.