Documentation ¶
Index ¶
Constants ¶
View Source
const ( DatadogHostUS endpoint = "https://http-intake.logs.datadoghq.com" DatadogHostEU endpoint = "https://http-intake.logs.datadoghq.eu" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatadogHook ¶
type DatadogHook struct { ApiKey string Service string Hostname string Source string Tags *map[string]string ClientBatchingEnabled bool MinLevel logrus.Level MaxRetry int DatadogEndpoint endpoint Formatter logrus.Formatter // contains filtered or unexported fields }
func (*DatadogHook) Close ¶
func (h *DatadogHook) Close()
Closes the Datadog hook and shuts down gracefully after sending all
func (*DatadogHook) Fire ¶
func (h *DatadogHook) Fire(entry *logrus.Entry) error
Fire - implement Hook interface fire the entry
func (*DatadogHook) Levels ¶
func (h *DatadogHook) Levels() []logrus.Level
Levels - implement Hook interface supporting all levels
type Options ¶
type Options struct { // The Datadog Api Key needed to authenticate ApiKey *string // The Minimum level of log to send to datadog, default is logrus.InfoLevel MinimumLoggingLevel *logrus.Level // The datadog endpoint to send logs to, default is DatadogHostUS DatadogEndpoint *endpoint // The Service tag to add to all logs Service *string // The Host tag to add to all logs Host *string // The source tag to add to all logs Source *string // A map of custom tags to add to every log GlobalTags *map[string]string // Controls whether logs are batched locally before sending to Datadog; Defaults to true ClientBatchingEnabled *bool }
Click to show internal directories.
Click to hide internal directories.