logger

package
v1.106.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel string
const (
	LogLevelOff     LogLevel = "Off"
	LogLevelTrace   LogLevel = "Trace"
	LogLevelDebug   LogLevel = "Debug"
	LogLevelInfo    LogLevel = "Info"
	LogLevelWarning LogLevel = "Warning"
)

func ParseLogLevel

func ParseLogLevel(logLevel string) (LogLevel, error)

type Logger

type Logger struct {
	LogLevel LogLevel
	File     string
}

func NewLogger

func NewLogger(logLevel LogLevel, file string) (*Logger, error)

func NewLoggerFromCliConfig

func NewLoggerFromCliConfig(cfg schema.CliConfiguration) (*Logger, error)

func (*Logger) Debug

func (l *Logger) Debug(message string)

func (*Logger) Error

func (l *Logger) Error(err error)

func (*Logger) Info

func (l *Logger) Info(message string)

func (*Logger) SetLogLevel

func (l *Logger) SetLogLevel(logLevel LogLevel) error

func (*Logger) Trace

func (l *Logger) Trace(message string)

func (*Logger) Warning

func (l *Logger) Warning(message string)

Jump to

Keyboard shortcuts

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