logging

package
v0.0.0-...-febeaf7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseModule = fx.Options(
	fx.Provide(NewConfig),
	fx.Provide(NewLogger),
	fx.WithLogger(func(logger *zap.Logger) fxevent.Logger {
		return &fxevent.ZapLogger{Logger: logger}
	}),
)

Functions

func NewLogger

func NewLogger(cfg Config, lifecycle fx.Lifecycle) (*zap.Logger, error)

Types

type Config

type Config struct {
	Driver string `yaml:"driver"`
	Level  string `yaml:"level"`
}

func NewConfig

func NewConfig(cfg *config.YAML) (Config, error)

Jump to

Keyboard shortcuts

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