log

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 8 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) *zerolog.Logger

func ConfigureDefaultContextLoggerCustomWriter added in v0.0.4

func ConfigureDefaultContextLoggerCustomWriter(w io.Writer) *zerolog.Logger

func ConfigureRootLogger

func ConfigureRootLogger(serviceName string) (*zerolog.Logger, error)

func ConfigureRootLoggerWithConfig

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

Types

type Config

type Config struct {
	LogRootLevel      EnvLevel `env:"LOG_ROOT_LEVEL" envDefault:"INFO"`
	LogForcePlainText bool     `env:"LOG_FORCE_PLAIN_TEXT"`
}

type EnvLevel

type EnvLevel struct {
	Level zerolog.Level
}

func (*EnvLevel) UnmarshalText

func (receiver *EnvLevel) UnmarshalText(text []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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