Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NoCode means the entry code hasn't been set NoCode = iota // CloneError means we were unable to successfully clone the resource CloneError // ScanError means there was some issue scanning the cloned resource ScanError // ResourceCleanupError means we couldn't remove the resources that were cloned after a scan ResourceCleanupError // CommandError means there was an error with an external command CommandError // CloneDetail are log entries that are informational CloneDetail // ScanDetail are log entries that are informational ScanDetail )
Variables ¶
This section is empty.
Functions ¶
func SetLoggerFormat ¶
SetLoggerFormat adjusts the format Entry uses when calling String() on it
func SetLoggerLevel ¶
SetLoggerLevel takes the string version of the name and sets the current level
Types ¶
type Entry ¶
type Entry struct { Time string `json:"time"` Severity string `json:"severity"` Code string `json:"code,omitempty"` Message string `json:"message"` }
Entry defines a log entry
type LogCode ¶ added in v0.0.13
type LogCode int
LogCode defines the set of codes that can be set on an Entry
type LogFormat ¶
type LogFormat int
LogFormat is used to set the how the log messages should be displayed
type LogLevel ¶
type LogLevel int
LogLevel is used to determine which log severities should actually log
const ( // NOTSET will log everything NOTSET LogLevel = 0 // DEBUG will enable these logs and higher DEBUG LogLevel = 10 // INFO will enable these logs and higher INFO LogLevel = 20 // WARNING will enable these logs and higher WARNING LogLevel = 30 // ERROR will enable these logs and higher ERROR LogLevel = 40 // CRITICAL will enable these logs and higher CRITICAL LogLevel = 50 )
func GetLoggerLevel ¶
func GetLoggerLevel() LogLevel
GetLoggerLevel returns the current logger level
Click to show internal directories.
Click to hide internal directories.