Categorygithub.com/bluearchive/logrus_fluent
modulepackage
1.2.0
Repository: https://github.com/bluearchive/logrus_fluent.git
Documentation: pkg.go.dev

# README

Build Status Coverage Status

Fluentd Hook for Logrus :walrus:

Usage

import (
	"github.com/Sirupsen/logrus"
	"github.com/evalphobia/logrus_fluent"
)

func main() {
	hook := logrus_fluent.NewHook("localhost", 24224)
	hook.SetLevels([]logrus.Level{
		logrus.PanicLevel,
		logrus.ErrorLevel,
	})

	logrus.AddHook(hook)
}

Special fields

Some logrus fields have a special meaning in this hook.

  • tag is used as a fluentd tag. (if tag is omitted, Entry.Message is used as a fluentd tag, unless a static tag is set for the hook with hook.SetTag)

# Functions

ConvertToValue make map data from struct and tags.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author