logstash_kafka

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

@Time : 2019-11-04 9:31 @Author : zr

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableLogrusLogstashKafka

func EnableLogrusLogstashKafka(appName, logFile, tracePrefix string, zhHosts []string)

Types

type FrontKafka

type FrontKafka struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewLogstashFrontKafka

func NewLogstashFrontKafka(config *LogstashFrontKafkaConfig) *FrontKafka

func (*FrontKafka) GetLogrusHook

func (f *FrontKafka) GetLogrusHook() Hook

func (*FrontKafka) Log added in v1.3.1

func (f *FrontKafka) Log(entry *logrus.Entry)

type FrontStatus

type FrontStatus int
const (
	FrontStatusKafkaConnecting FrontStatus
	FrontStatusKafkaConnected
	FrontStatusKafkaReconnecting
	FrontStatusKafkaDisconnected
	FrontStatusStopping
	FrontStatusStopped
)

type Hook

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

func (Hook) Fire

func (h Hook) Fire(entry *logrus.Entry) error

func (Hook) Levels

func (h Hook) Levels() []logrus.Level

type LogstashFrontKafkaConfig

type LogstashFrontKafkaConfig struct {
	//应用名,用于创建ES索引
	AppName string
	//连接Kafka失败时信息储存位置
	FileLogPath string
	//trace字段预设值
	TracePrefix string
	ZKHosts     []string
}

func NewLogstashFrontKafkaConfig

func NewLogstashFrontKafkaConfig() *LogstashFrontKafkaConfig

Jump to

Keyboard shortcuts

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