servicehook

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorLogServiceHook

type ErrorLogServiceHook struct {
	ServiceID        int
	ServiceTypeID    int
	Address          string
	EtcdConf         *kit.ETCD3Config
	LogServicePrefix string
}

ErrorLogServiceHook is a hook for sending error log to log service

func NewErrorLogServiceHook

func NewErrorLogServiceHook(ServiceID int, ServiceTypeID int, address string, etcdConfig *kit.ETCD3Config, logServicePrefix string) *ErrorLogServiceHook

NewErrorLogServiceHook is new method for new ErrorLogServiceHook

func (*ErrorLogServiceHook) Fire

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

Fire is the method must defined in hook

func (*ErrorLogServiceHook) Levels

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

Levels is the method must defined in hook

Jump to

Keyboard shortcuts

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