logging

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package logging provides the default Zap-based implementation of the log.Logger interface. This module can be replaced with custom logging implementations while maintaining compatibility with the framework and other modules.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("logging",
	fx.Provide(
		NewZapLoggerAdapter,
		fx.Annotate(
			func(adapter *zapLoggerAdapter) log.Logger { return adapter },
			fx.As(new(log.Logger)),
		),
	),
)

Module provides the default Zap-based implementation of the log.Logger interface.

Functions

func NewZapLoggerAdapter

func NewZapLoggerAdapter(v *viper.Viper) (*zapLoggerAdapter, error)

NewZapLoggerAdapter creates a new Zap-based logger adapter.

Types

type Config

type Config struct {
	Level      string `mapstructure:"level"`       // Log level: debug, info, warn, error
	Encoding   string `mapstructure:"encoding"`    // Output format: json or console
	OutputPath string `mapstructure:"output_path"` // Output path: stdout, stderr, or file path
}

Config holds the logging configuration.

Jump to

Keyboard shortcuts

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