log

package
v0.0.0-...-9b27197 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger = log.NewNopLogger()
)

Functions

func CheckFatal

func CheckFatal(location string, err error)

func InitLogger

func InitLogger(cfg *Config)

func NewDefaultLogger

func NewDefaultLogger(l logging.Level, format logging.Format) log.Logger

Types

type Config

type Config struct {
	LogFormat string            `mapstructure:"log_format"`
	LogLevel  string            `mapstructure:"log_level"`
	Log       logging.Interface `mapstructure:"-"`
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

Jump to

Keyboard shortcuts

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