Skip to content

landru29/ovh-logrus-hook-graylog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

OVH Graylog hook for logrus :walrus:

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")
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages