log

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFlags

func ConfigFlags(cmd *cobra.Command, prefix, level string) error

ConfigFlags helps configure cobra and viper flags.

func Init

func Init(config *Config) error

Init configures the global logger

Types

type Config

type Config struct {
	Level    string `mapstructure:"level"`
	ForceTTY bool   `mapstructure:"forcetty"`
	ShowLine bool   `mapstructure:"line"`
}

Config configures the logger

func (*Config) Validate

func (c *Config) Validate() error

Validate configuration is ok

Jump to

Keyboard shortcuts

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