logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoggerEncoder

func GetLoggerEncoder(format string) zapcore.Encoder

获取 json 或者普通日志格式编码

func GetLoggerWriter

func GetLoggerWriter(logPath, suffix string) zapcore.WriteSyncer

获取日志写入对象

func NewLogger

func NewLogger(logPath string) *zap.Logger

Types

type KafkaWriterSync

type KafkaWriterSync struct {
	Topic string `json:"topic"`
	// contains filtered or unexported fields
}

func NewKafkaWriterSync

func NewKafkaWriterSync(producer *sarama.SyncProducer) *KafkaWriterSync

func (KafkaWriterSync) Sync

func (k KafkaWriterSync) Sync() error

func (KafkaWriterSync) Write

func (k KafkaWriterSync) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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