Documentation ¶
Overview ¶
Package logger provides logger tool for perun for control standard I/O usage.
Index ¶
- func IsVerbosityValid(verbosity string) bool
- type Logger
- func (logger *Logger) AddResourceForValidation(resourceName string) *ResourceValidation
- func (logger *Logger) Always(message string)
- func (logger *Logger) Debug(debug string)
- func (logger *Logger) Error(err string)
- func (logger *Logger) GetInput(message string, v ...interface{}) error
- func (logger *Logger) HasValidationErrors() bool
- func (logger *Logger) HasValidationWarnings() bool
- func (logger *Logger) Info(info string)
- func (logger *Logger) PrintValidationErrors()
- func (logger *Logger) SetVerbosity(verbosity string)
- func (logger *Logger) Trace(trace string)
- func (logger *Logger) Warning(warning string)
- type LoggerInt
- type ResourceValidation
- type Verbosity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsVerbosityValid ¶
Check if verbosity is one of the given types.
Types ¶
type Logger ¶
type Logger struct { Quiet bool Yes bool Verbosity Verbosity // contains filtered or unexported fields }
func (*Logger) AddResourceForValidation ¶
func (logger *Logger) AddResourceForValidation(resourceName string) *ResourceValidation
AddResourceForValidation : Adds resource for validation. It's used in validateResources().
func (*Logger) HasValidationErrors ¶
HasValidationErrors checks if resource has errors. It's used in validateResources().
func (*Logger) HasValidationWarnings ¶
func (*Logger) PrintValidationErrors ¶
func (logger *Logger) PrintValidationErrors()
Print validation error.
func (*Logger) SetVerbosity ¶
Set logger verbosity.
type LoggerInt ¶
type LoggerInt interface { Always(message string) Warning(warning string) Error(err string) Info(info string) Debug(debug string) Trace(trace string) GetInput(message string, v ...interface{}) error PrintValidationErrors() HasValidationErrors() bool HasValidationWarnings() bool AddResourceForValidation(resourceName string) *ResourceValidation SetVerbosity(verbosity string) }
Logger contains information type of logger tool.
type ResourceValidation ¶
ResourceValidation contains name of resource and errors.
func (*ResourceValidation) AddValidationError ¶
func (resourceValidation *ResourceValidation) AddValidationError(error string)
Log validation error.
func (*ResourceValidation) AddValidationWarning ¶
func (resourceValidation *ResourceValidation) AddValidationWarning(warning string)
Log validation error.
Click to show internal directories.
Click to hide internal directories.