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(config 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
FlushEvery time.Duration
MayDrop bool
LineJSON bool
MessageFormatter logrus.Formatter
}
Config is the configuration struct for LogDNAHook
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.