Categorygithub.com/thevan4/logrus-graylog-http-hook
modulepackage
1.1.0
Repository: https://github.com/thevan4/logrus-graylog-http-hook.git
Documentation: pkg.go.dev

# README

logrus-graylog-http-hook

Warning: default http client => insecure tls!

Example

import (
	"github.com/sirupsen/logrus"
	graylogHttpHook "github.com/thevan4/logrus-graylog-http-hook"
)
...
	logrusLog := logrus.New()
	graylogHook := graylogHttpHook.NewGraylogHook(logger.Graylog.Address, logger.Graylog.Retries, logger.Graylog.Extra, nil)
	logrusLog.AddHook(graylogHook)
	logrusLog.SetOutput(ioutil.Discard)

# Functions

NewGraylogHook creates a Writer.

# Variables

BufSize = <value> set before calling NewGraylogHook Once the buffer is full, logging will start blocking, waiting for slots to be available in the queue.

# Structs

GraylogHook is a writer for graylog.
GraylogMessage ...