Zerolog adapter for uber-go/fx/fxevent.
- 1.18
go get -u github.com/efectn/fx-zerolog@latest
import (
"github.com/rs/zerolog"
"go.uber.org/fx"
"github.com/efectn/fx-zerolog"
)
// ...
func main() {
fx.New(
fx.Provide(
NewLogger,
NewConfig,
NewRouter,
),
fx.Invoke(Listen),
WithLogger(
fxzerolog.Init(),
),
)
}
fx-zerolog is licensed under the terms of the GPL-3 License (see LICENSE).