Help us shape the future of Go! Take the 2026 Go Developer Survey

ovh-logrus-hook-graylog

module
v0.0.0-...-32898ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2018 License: MIT

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

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL