zap

package
v1.154.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnabled added in v1.143.2

func IsEnabled(c *Config) bool

IsEnabled for zap.

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,omitempty" json:"enabled,omitempty" toml:"enabled,omitempty"`
	Level   string `yaml:"level,omitempty" json:"level,omitempty" toml:"level,omitempty"`
}

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