log

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FormatViperKey = "log.format"
)
View Source
const (
	LevelViperKey = "log.level"
)

Variables

This section is empty.

Functions

func Flags

func Flags(v *viper.Viper, f *pflag.FlagSet)

func Format

func Format(v *viper.Viper, f *pflag.FlagSet)

func Level

func Level(v *viper.Viper, f *pflag.FlagSet)

func New

func New(cfg *Config) (*logrus.Logger, error)

Types

type Config

type Config struct {
	Level, Format string
}

func NewConfigFromViper

func NewConfigFromViper(v *viper.Viper) *Config

func (*Config) SetDefault

func (cfg *Config) SetDefault() *Config

Jump to

Keyboard shortcuts

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