zaplogger

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

ZapLogger - wrapper for zap

GitHub license GitHub top language GitHub go.mod Go version Scrutinizer Code Quality

Logging both to file and kafka topics.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceID                string
	StdOutLoggerEnabled      bool
	FileLoggerEnabled        bool
	FileLoggerPath           string
	FileLoggerMaxSize        int // megabytes
	FileLoggerMaxBackups     int // amount
	FileLoggerMaxAge         int // days
	StreamLoggerEnabled      bool
	StreamLoggerAddrs        string
	StreamLoggerUsername     string
	StreamLoggerPassword     string
	StreamLoggerTopic        string
	StreamLoggerBatchSize    int // messages
	StreamLoggerBatchTimeout int // millisexonds
}

type ZapLogger

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

func New

func New(c *Config) (*ZapLogger, error)

func (*ZapLogger) Debugf

func (l *ZapLogger) Debugf(template string, args ...any)

func (*ZapLogger) Errorf

func (l *ZapLogger) Errorf(template string, args ...any)

func (*ZapLogger) Fatalf

func (l *ZapLogger) Fatalf(template string, args ...any)

func (*ZapLogger) Infof

func (l *ZapLogger) Infof(template string, args ...any)

func (*ZapLogger) Panicf

func (l *ZapLogger) Panicf(template string, args ...any)

func (*ZapLogger) Warnf

func (l *ZapLogger) Warnf(template string, args ...any)

Jump to

Keyboard shortcuts

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