log

package
v0.0.0-...-8e17a21 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextHook

type ContextHook struct{}

ContextHook storing nothing but behavior

func (ContextHook) Fire

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

Fire the log entry

func (ContextHook) Levels

func (hook ContextHook) Levels() []logrus.Level

Levels returns all log levels

type HexHook

type HexHook struct{}

func (HexHook) Fire

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

Fire the log entry

func (HexHook) Levels

func (hook HexHook) Levels() []logrus.Level

Levels returns all log levels

type SyslogHook

type SyslogHook struct {
	Writer        *b_syslog.Writer
	SyslogNetwork string
	SyslogRaddr   string
}

SyslogHook to send logs via syslog.

func NewSyslogHook

func NewSyslogHook(appName, facility string) (*SyslogHook, error)

NewSyslogHook creats SyslogHook

func (*SyslogHook) Fire

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

Fire the log entry

func (*SyslogHook) Levels

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

Levels returns list of levels

Jump to

Keyboard shortcuts

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