Documentation ¶
Overview ¶
Package logrussplunk allows hooking into logrus such that all logs will go to splunk via the Splunk HTTP Event Collector (HEC).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEventsBufferOverflow = errors.New("events buffer overflow")
ErrEventsBufferOverflow is returned by `Fire` if the we log and event but have yet to process all previous events.
View Source
var ErrMissingSplunkHost = errors.New("missing splunk host")
ErrMissingSplunkHost is returned by `NewSplunkHook` if the given configuration has no splunk host
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type ErrSplunkSendFailed ¶
type ErrSplunkSendFailed struct {
// contains filtered or unexported fields
}
ErrSplunkSendFailed indicates that the hook failed to submit an error to Splunk.
func (ErrSplunkSendFailed) Error ¶
func (e ErrSplunkSendFailed) Error() string
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook can be registered as a `logrus.Hook`.
func NewSplunkHook ¶
func NewSplunkHook(config Configuration) (*Hook, error)
NewSplunkHook initializes a logrus hook which sends logs to the configured Splunk HEC. The returned object should be registered with a log via `AddHook()`
Click to show internal directories.
Click to hide internal directories.