Documentation ¶
Index ¶
- Constants
- Variables
- func AddHook(hook logrus.Hook)
- func Entry(ctx context.Context) *logrus.Entry
- func GetWriter() io.Writer
- func IsDebugLevelEnabled() bool
- func IsTraceLevelEnabled() bool
- func KanikoLogLevel() logrus.Level
- func New() *logrus.Logger
- func SetLevel(level Level)
- func SetupLogs(stdErr io.Writer, level string, timestamp bool, hook logrus.Hook) error
- type EventContext
- type Level
Constants ¶
View Source
const DefaultLogLevel = WarnLevel
DefaultLogLevel for the global Skaffold logger
Variables ¶
View Source
var AllLevels = []Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, TraceLevel, }
AllLevels exposes all logging levels
View Source
var ContextKey = contextKey{}
Functions ¶
func Entry ¶
Entry takes an context.Context and constructs a logrus.Entry from it, adding fields for task and subtask information
func IsDebugLevelEnabled ¶
func IsDebugLevelEnabled() bool
IsDebugLevelEnabled returns true if debug level log is enabled.
func IsTraceLevelEnabled ¶
func IsTraceLevelEnabled() bool
IsTraceLevelEnabled returns true if trace level log is enabled.
func KanikoLogLevel ¶
KanikoLogLevel makes sure kaniko logs at least at Info level and at most Debug level (trace doesn't work with Kaniko)
Types ¶
type EventContext ¶
type Level ¶
type Level uint32
Level type for logging levels
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
Logging levels. Defining our own so we can encapsulate the underlying logger implementation.
Click to show internal directories.
Click to hide internal directories.