package logrus_papertrail

import "github.com/sirupsen/logrus/hooks/papertrail"

Index

Types

type PapertrailHook

type PapertrailHook struct {
	Host    string
	Port    int
	AppName string
	UDPConn net.Conn
}

PapertrailHook to send logs to a logging service compatible with the Papertrail API.

func NewPapertrailHook

func NewPapertrailHook(host string, port int, appName string) (*PapertrailHook, error)

NewPapertrailHook creates a hook to be added to an instance of logger.

func (*PapertrailHook) Fire

func (hook *PapertrailHook) Fire(entry *logrus.Entry) error

Fire is called when a log event is fired.

func (*PapertrailHook) Levels

func (hook *PapertrailHook) Levels() []logrus.Level

Levels returns the available logging levels.

Source Files

papertrail.go

Version
v0.6.2
Published
Dec 10, 2014
Platform
js/wasm
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.