influxdbhook

package module
v0.0.0-...-a43a865 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: MIT Imports: 4 Imported by: 0

README

influxdbhook

Package influxdbhook provides a logrus hook for sending logs to InfluxDB

Why?

I wanted to send logs to InfluxDB and to learn to write hooks for logrus.

Documentation

Overview

Package influxdbhook provides a logrus hook for sending logs to InfluxDB

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfluxDBHook

type InfluxDBHook struct {
	// contains filtered or unexported fields
}

InfluxDBHook is a logrus hook sends logs to InfluxDB

func InitInfluxDBHook

func InitInfluxDBHook(
	c client.Client,
	batchPointsConfig client.BatchPointsConfig,
	metric string,
	tags []string,
	batchInterval time.Duration,
	batchSize int,
	levels []logrus.Level) *InfluxDBHook

InitInfluxDBHook creates & initializes a InfluxDBHook

func (*InfluxDBHook) Fire

func (h *InfluxDBHook) Fire(entry *logrus.Entry) error

Fire implementation of interface logrus.Hook

func (*InfluxDBHook) Levels

func (h *InfluxDBHook) Levels() []logrus.Level

Levels implementation of interface logrus.Hook

Jump to

Keyboard shortcuts

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