centralog

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const IDKey string = "centralog_id"

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(conf zap.Config, serverAddr string) error

func InitLoggerWithOpt

func InitLoggerWithOpt(conf zap.Config, opts *LogOptions) error

func Sync

func Sync()

Types

type ChainLogger

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

func Debug

func Debug(msg string) *ChainLogger

func Error

func Error(msg string) *ChainLogger

func Info

func Info(msg string) *ChainLogger

func Warn

func Warn(msg string) *ChainLogger

func (*ChainLogger) Any

func (cl *ChainLogger) Any(key string, val interface{}) *ChainLogger

func (*ChainLogger) CtxID

func (cl *ChainLogger) CtxID(ctx context.Context) *ChainLogger

func (*ChainLogger) Log

func (cl *ChainLogger) Log()

type LogOptions

type LogOptions struct {
	Server     string
	Db         string // optional
	Collection string // optional
}

Jump to

Keyboard shortcuts

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