logger

package
v1.6.0-rc02 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	FlagLogLevel               = "log_level"
	FlagLogFile                = "log-file"
	FlagMaxLogSize             = "max-log-size"
	FlagModuleLogLevelOverride = "module-log-level-override"
)

logging flags

Variables

This section is empty.

Functions

func AddLogFlags

func AddLogFlags(cmd *cobra.Command)

func ConvertStringToStringMap

func ConvertStringToStringMap(input string, mapSeperator string, kvSeperator string) map[string]string

ConvertStringToStringMap converts a string to a map[string]string. The input string is expected to be for example "key1:value1,key2:value2" where seperators can be specified.

Types

type Logger

type Logger struct {
	*log.Logger
	Fields log.Fields
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(path string, maxSize int, level string, moduleOverrideLevel ...map[string]string) Logger

NewLog creates a new Log struct with the given persistent fields

func (Logger) Debug

func (l Logger) Debug(msg string, keyvals ...interface{})

func (Logger) Error

func (l Logger) Error(msg string, keyvals ...interface{})

func (Logger) Info

func (l Logger) Info(msg string, keyvals ...interface{})

func (Logger) With

func (l Logger) With(keyvals ...interface{}) tmlog.Logger

Jump to

Keyboard shortcuts

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