Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Hostname string Facility string StaticMeta map[string]interface{} // static meta always sent to graylog // default not compress to save cpu power as logs are most likely to send over private network CompressType gelf.CompressType // default to NoCompression CompressionLevel int // default to flate.NoCompression // health check HealthCheckInterval time.Duration // default to 5 seconds }
Config stores graylog hook config
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook implements logrus.Hook for sending log to graylog
func (*Hook) SetNodeConfigs ¶
func (h *Hook) SetNodeConfigs(configs ...NodeConfig) error
SetNodeConfigs set graylog nodes with node configs given
func (*Hook) StartHealthCheck ¶
func (h *Hook) StartHealthCheck()
StartHealthCheck checks if graylog nodes are alive periodically
type NodeConfig ¶
NodeConfig stores node configuration
Click to show internal directories.
Click to hide internal directories.