Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureEarlyLogging ¶
func ConfigureEarlyLogging()
ConfigureEarlyLogging does minimal logging config for early startup. It either disables non-panic logging entirely or, if the FELIX_LOGSEVERITYSCREEN environment variable is set, enables the given log level to screen.
func ConfigureLogging ¶
ConfigureLogging uses the resolved configuration to complete the logging configuration. It creates hooks for the relevant logging targets and attaches them to logrus.
Types ¶
type ContextHook ¶
type ContextHook struct { }
func (ContextHook) Levels ¶
func (hook ContextHook) Levels() []log.Level
type Formatter ¶
type Formatter struct{}
Formatter is our custom log formatter, which mimics the style used by the Python version of Felix. In particular, it uses a sortable timestamp and logs the level and PID. Since logrus deosn't yet expose file and line numbers, we log "go" as a placeholder.
2016-10-04 14:45:45,999 [ERROR][70826] go: Hello world key=value
type LeveledHook ¶
type LeveledHook struct {
// contains filtered or unexported fields
}
func (*LeveledHook) Levels ¶
func (h *LeveledHook) Levels() []log.Level
type NullWriter ¶
type NullWriter struct{}
NullWriter is a dummy writer that always succeeds and does nothing.
type StreamHook ¶
type StreamHook struct {
// contains filtered or unexported fields
}
StreamHook is a logrus Hook that writes to a stream when fired. It supports configuration of log levels at which is fires.
func (*StreamHook) Levels ¶
func (h *StreamHook) Levels() []log.Level