module
Version:
v0.0.0-...-32898ac
Opens a new window with list of versions in this module.
Published: Feb 6, 2018
License: MIT
Opens a new window with license information.
README
¶
OVH Graylog hook for logrus 
Usage
import (
"github.com/sirupsen/logrus"
"github.com/landru29/ovh-logrus-hook-graylog/grayloghook"
)
func main () {
logger := logrus.New()
graylogHost := "gra2.logs.ovh.com:12202"
graylogToken := "here-is-my-token"
logger.AddHook(grayloghook.NewGraylogHook(graylogHost, graylogToken, "example.org", &tls.Config{}))
logger.WithFields(map[string]string{
"foo": "example",
}).Printf("This is an example")
}
Directories
¶
Click to show internal directories.
Click to hide internal directories.