lachesis_log

package
v0.0.0-...-168a2c3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package lachesis_log lachesis hook to logrus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocal

func NewLocal(logger *logrus.Logger, logLevel string)

NewLocal installs a test hook for a given local logger.

Types

type Hook

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

Hook struct for linking to logrus and counting log outputs

func (*Hook) Fire

func (t *Hook) Fire(e *logrus.Entry) error

Fire triggers on every log event and counts the events

func (*Hook) Levels

func (t *Hook) Levels() []logrus.Level

Levels returns all log levels

type SyslogHook

type SyslogHook struct {
	Writer *syslog.Writer
}

SyslogHook to send logs via syslog.

func NewSyslogHook

func NewSyslogHook(network, raddr string, tag string) (*SyslogHook, error)

Creates a hook to be added to an instance of logger. This is called with `hook, err := NewSyslogHook("udp", "localhost:514", "")` `if err == nil { log.Hooks.Add(hook) }`

func (*SyslogHook) Fire

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

func (*SyslogHook) Levels

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

Jump to

Keyboard shortcuts

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