zaplogger

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(mode string, fileName string, maxSize, maxBackups, maxAge int, compress bool, enableKafka bool, kafkaAddress []string) *zap.Logger

InitLogger initial logger

Types

type LogKafka

type LogKafka struct {
	Producer sarama.SyncProducer
	Topic    string
}

LogKafka zap log to kafka

func (*LogKafka) Write

func (lk *LogKafka) Write(p []byte) (n int, err error)

Write log to kafka via topic

Jump to

Keyboard shortcuts

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