logging

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(cfg LoggerConfig, m *metrics.Metrics) (*zap.Logger, error)

Types

type LoggerConfig

type LoggerConfig interface {
	// Whether to output debugging log messages or not.
	IsDebugLogging() bool

	// Outputs json formatted log messes if true. Otherwise outputs human readable ones.
	IsDevStyleLogging() bool
}

type SimpleLoggerConfigImpl

type SimpleLoggerConfigImpl struct {
	// contains filtered or unexported fields
}

func NewSimpleLoggerConfig

func NewSimpleLoggerConfig() *SimpleLoggerConfigImpl

This one is mainly for unit tests... usually there is a config instance based upon environment variables, some other logic..

func (*SimpleLoggerConfigImpl) IsDebugLogging

func (c *SimpleLoggerConfigImpl) IsDebugLogging() bool

func (*SimpleLoggerConfigImpl) IsDevStyleLogging

func (c *SimpleLoggerConfigImpl) IsDevStyleLogging() bool

func (*SimpleLoggerConfigImpl) SetDebugLogging

func (c *SimpleLoggerConfigImpl) SetDebugLogging(v bool)

func (*SimpleLoggerConfigImpl) SetDevStyleLogging

func (c *SimpleLoggerConfigImpl) SetDevStyleLogging(v bool)

Jump to

Keyboard shortcuts

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