log

package
v0.0.0-...-a3811b2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLoggers

func InitLoggers(globalCfg GlobalConfig, subCfgs map[string]GlobalConfig, opts ...zap.Option) error

InitLoggers initializes the global logger and other sub loggers.

func L

func L() *zap.Logger

L wraps zap.L().

func Logger

func Logger(name string) *zap.Logger

Logger returns logger of the given name

func RegisterLevelConfigMux

func RegisterLevelConfigMux(root *http.ServeMux)

RegisterLevelConfigMux registers log's level config http mux.

func S

func S() *zap.SugaredLogger

S wraps zap.S().

Types

type GlobalConfig

type GlobalConfig struct {
	Zap                *zap.Config `json:"zap" yaml:"zap"`
	StderrRedirectFile *string     `json:"stderrRedirectFile" yaml:"stderrRedirectFile"`
	RedirectStdLog     bool        `json:"stdLogRedirect" yaml:"stdLogRedirect"`
}

GlobalConfig defines the global logger configurations.

Jump to

Keyboard shortcuts

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