Logrus hook for sending logs to logz.io.
Package logzruz provides a logrus hook for sending log messages to logz.io servers for further processing.
The library buffers messages until a user-defined threshold has been reached or a ticker triggers a regular buffer flush. By employing two methods of buffer flushing as well as providing a manual way to send messages, applications can utilise faster logging while making sure messages get sent within a reasonable time frame.
As of now, logzruz will send all message levels to logz.io
go get -u github.com/MorpheusXAUT/logzruz
logzruz can be added to logrus just like every other hook. Applications are only required to provide an API token for the hook to function:
package main
import (
"github.com/Sirupsen/logrus"
"github.com/MorpheusXAUT/logzruz"
)
func main() {
logz, err := logzruz.NewHook(logzruz.HookOptions{
Token: "YOURLOGZIOTOKEN",
}
// check for token or URL parsing error
if err != nil {
panic(err)
}
log.Hooks.Add(logz)
log.Info("Hello to logz.io!")
}
see https://godoc.org/github.com/MorpheusXAUT/logzruz
Structured, pluggable logging library developed by Sirupsen.