compcontzap

package module
v0.0.0-...-c98b72b Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TypeName compcont.ComponentType = "contrib.zap"

Variables

This section is empty.

Functions

func MustRegister

func MustRegister(registry compcont.IFactoryRegistry)

func New

func New(cfg Config) (c *zap.Logger, err error)

Types

type Config

type Config struct {
	BaseConfig  string      `ccf:"base_config"` // "","development","production"
	ExtraConfig ExtraConfig `ccf:"extra_config"`
}

type ExtraConfig

type ExtraConfig struct {
	Level             *string  `ccf:"level"`
	DisableCaller     *bool    `ccf:"disable_caller"`
	DisableStacktrace *bool    `ccf:"disable_stacktrace"`
	Encoding          *string  `ccf:"encoding"`
	OutputPaths       []string `ccf:"output_paths"`
	ErrorOutputPaths  []string `ccf:"error_output_paths"`
}

func (*ExtraConfig) MergeTo

func (c *ExtraConfig) MergeTo(input zap.Config) (output zap.Config, err error)

type LoggerProvider

type LoggerProvider interface {
	GetLogger() *zap.Logger
}

Jump to

Keyboard shortcuts

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