log

package module
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MdcServiceName   = "ServiceName"
	MdcSchedulerName = "SchedulerName"
)
View Source
const (
	ReceiveRequest = "Receive request: %++v"
)

Variables

This section is empty.

Functions

func ConfigureDefaultContextLogger

func ConfigureDefaultContextLogger(forcePlainText bool, zapConfig zap.Config) *zap.Logger

func ConfigureDefaultContextLoggerCustomConfig

func ConfigureDefaultContextLoggerCustomConfig(config zap.Config) *zap.Logger

func ConfigureRootLogger

func ConfigureRootLogger(ctx context.Context, serviceName string, zapConfig zap.Config) (*zap.Logger, error)

func ConfigureRootLoggerWithConfig

func ConfigureRootLoggerWithConfig(serviceName string, zapConfig zap.Config, config Config) (*zap.Logger, error)

Types

type Config

type Config struct {
	LogRootLevel      zapcore.Level `env:"LOG_ROOT_LEVEL" envDefault:"info"`
	LogForcePlainText bool          `env:"LOG_FORCE_PLAIN_TEXT"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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