lumberjackhook

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

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

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

README

lumberjackhook

Package lumberjackhook provides a logrus hook for sending logs to lumberjack

Why?

I wanted to send logs to a file (rollover logging, lumberjack) and to learn to write hooks for logrus. It works.

Documentation

Overview

Package lumberjackhook provides a logrus hook for sending logs to lumberjack

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LumberjackHook

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

LumberjackHook is a logrus hook sends logs to InfluxDB

func InitLumberjackHook

func InitLumberjackHook(levels []logrus.Level, lumberjackLogger *lumberjack.Logger) *LumberjackHook

InitLumberjackHook creates & initializes a LumberjackHook

func (*LumberjackHook) Fire

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

Fire implementation of interface logrus.Hook

func (*LumberjackHook) Levels

func (h *LumberjackHook) 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