loggingfx

package
v0.1.1-0...-03eb687 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdLoggerModule = fx.Module("logger_std",
	fx.Provide(
		func() *log.Logger {
			return log.New(os.Stdout, "", 0)
		},
		fx.Annotate(
			logging2.NewStdLogger,
			fx.As(new(logging2.Logger)),
		),
	),
)
View Source
var ZerologAppLoggerModule = fx.Module("logger_zerolog_app",
	fx.Provide(
		func(cfg application.Config) zerolog.Logger {
			return logging2.NewApplicationLogger(cfg, os.Stdout)
		},
		fx.Annotate(
			logging2.NewZerologLogger,
			fx.As(new(logging2.Logger)),
		),
	),
)
View Source
var ZerologLoggerModule = fx.Module("logger_zerolog",
	fx.Provide(
		func() zerolog.Logger {
			return zerolog.New(os.Stdout).With().Timestamp().Logger()
		},
		fx.Annotate(
			logging2.NewZerologLogger,
			fx.As(new(logging2.Logger)),
		),
	),
)

Functions

func DecorateLoggerWithModule

func DecorateLoggerWithModule(moduleName string) any

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳