Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook represents a Logrus Logzio hook
func New ¶
New creates a default Logzio hook. What it does is taking `token` and `appName` and attaching them to the log data. In addition, it sets a connection to the Logzio's Logstash endpoint. If the connection fails, it returns an error.
To set more advanced configurations, initialize the hook in the following way:
hook := &Hook{&HookOpts{
Sender: logzioSender,
AdditionalFields: logrus.Fields{...},
}
Click to show internal directories.
Click to hide internal directories.