Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultIngestURL = "https://logs.logdna.com/logs/ingest"
DefaultIngestURL is the URL of the LogDNA ingestion API endpoint
Variables ¶
This section is empty.
Functions ¶
func NewFromConfig ¶
func NewFromConfig(cfg config.Configuration) (logrus.Hook, error)
NewFromConfig creates a new LogDNA hook from the Logrus Mate configuration
Types ¶
type Config ¶
type Config struct { IngestURL string APIKey string Hostname string MAC string IP string App string // NOTE: App and Env are global at the moment Env string BufferSize int QueueSize int FlushEvery time.Duration MayDrop bool LineJSON bool MessageFormatter logrus.Formatter // Instrumentation functions, called in a separate goroutine OnDrop func(entries int) OnFlush func(entries int, err error) }
Config is the configuration struct for LogDNAHook
func NewConfig ¶ added in v0.3.0
func NewConfig(cfg config.Configuration) Config
NewConfig creates a new LogDNA Config from the Logrus Mate configuration
type Hook ¶
type Hook struct { Config *Config // contains filtered or unexported fields }
Hook is a Logrus hook that sends entries to LogDNA
type SimpleTextFormatter ¶
SimpleTextFormatter is a simplified version of logrus.TextFormatter It only renders the message text followed with key-value pairs, no colors (and terminal detection) or timestamps.
Click to show internal directories.
Click to hide internal directories.