log

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package log configures the logging system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFlags

func ConfigFlags(cmd *cobra.Command, prefix, defaultLevel 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:"tty"`
	JSON     bool   `mapstructure:"json"`
	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