log

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 5 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 GetFormat added in v0.3.1

func GetFormat(v *viper.Viper) string

func GetLevel added in v0.3.1

func GetLevel(v *viper.Viper) string

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 ConfigFromViper added in v0.3.1

func ConfigFromViper(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