zap

package
v0.0.0-...-dc7611c Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module provided to fxlog https://uber-go.github.io/fx/modules.html

View Source
var ModuleFunc = func(l logger.Logger) fx.Option {
	return fx.Module(
		"zapfx",

		fx.Provide(config.ProvideLogConfig),
		fx.Supply(fx.Annotate(l, fx.As(new(logger.Logger)))),
		fx.Supply(fx.Annotate(l, fx.As(new(ZapLogger)))),
	)
}

Functions

This section is empty.

Types

type ZapLogger

type ZapLogger interface {
	logger.Logger
	InternalLogger() *zap.Logger
	DPanic(args ...interface{})
	DPanicf(template string, args ...interface{})
	Sync() error
}

func NewZapLogger

func NewZapLogger(cfg *config2.LogOptions, env environemnt.Environment) ZapLogger

NewZapLogger create new zap logger

Jump to

Keyboard shortcuts

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