papertrail

package
v0.0.0-...-5ae846b Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package papertrail provides utilities for using syslog with Papertrail

Package papertrail implements a papertrail logfmt format handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Papertrail settings.
	Host string // Host subdomain such as "logs4"
	Port int    // Port number

	// Application settings
	Hostname string // Hostname value
	Tag      string // Tag value

	// Advanced: tweak how we send logs to papertrail
	// Capacity is the amount of log to queue before
	// we start dropping, write timeout dictates how
	// long we should wait before giving up on a write
	Capacity       int
	ConnectTimeout time.Duration
	WriteTimeout   time.Duration
}

Config for Papertrail.

type Handler

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

Handler implementation.

func New

func New(config *Config) *Handler

New handler.

func (*Handler) Flush

func (h *Handler) Flush()

Flush fn

func (*Handler) HandleLog

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

Jump to

Keyboard shortcuts

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