Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DebugLevel = LogLevel(zapcore.DebugLevel.String()) InfoLevel = LogLevel(zapcore.InfoLevel.String()) WarnLevel = LogLevel(zapcore.WarnLevel.String()) ErrorLevel = LogLevel(zapcore.ErrorLevel.String()) DPanicLevel = LogLevel(zapcore.DPanicLevel.String()) PanicLevel = LogLevel(zapcore.PanicLevel.String()) FatalLevel = LogLevel(zapcore.FatalLevel.String()) )
View Source
var Module = fx.Options( fx.Provide(New), fx.WithLogger(func(logger *zap.SugaredLogger) fxevent.Logger { return &fxevent.ZapLogger{Logger: logger.Desugar()} }), fx.Decorate(RegisterLogLevelValidation), )
Functions ¶
func RegisterLogLevelValidation ¶
func RegisterLogLevelValidation(validate *validator.Validate) (*validator.Validate, error)
Types ¶
type Config ¶
type Config struct { Path string `mapstructure:"path" yaml:"path" validate:"required"` Level struct { File LogLevel `mapstructure:"file" yaml:"file" validate:"required,loglevel"` Console LogLevel `mapstructure:"console" yaml:"console" validate:"required,loglevel"` } `mapstructure:"level" yaml:"level" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.