zap

package
v1.131.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Unlicense Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(env env.Environment, config *Config) (zap.Config, error)

NewConfig for zap.

func NewLogger

func NewLogger(params LoggerParams) (*zap.Logger, error)

NewLogger using zap.

Types

type Config added in v1.97.0

type Config struct {
	Enabled bool   `yaml:"enabled" json:"enabled" toml:"enabled"`
	Level   string `yaml:"level" json:"level" toml:"level"`
}

Config for zap.

type LoggerParams

type LoggerParams struct {
	fx.In

	Lifecycle   fx.Lifecycle
	Config      *Config
	ZapConfig   zap.Config
	Environment env.Environment
	Version     version.Version
}

LoggerParams for zap.

Jump to

Keyboard shortcuts

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