Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Levels = []logutils.LogLevel{"DEBUG", "INFO", "WARN", "ERR"}
Levels are the log levels we respond to=o.
Functions ¶
func NewLogFilter ¶
func NewLogFilter() *logutils.LevelFilter
NewLogFilter returns a LevelFilter that is configured with the log levels that we use.
func ValidateLevelFilter ¶
func ValidateLevelFilter(min logutils.LogLevel, filter *logutils.LevelFilter) bool
ValidateLevelFilter verifies that the log levels within the filter are valid.
Types ¶
type Config ¶
type Config struct {
// Name is the progname as it will appear in syslog output (if enabled).
Name string
// Level is the log level to use.
Level string
// Syslog and SyslogFacility are the syslog configuration options.
Syslog bool
SyslogFacility string
// Writer is the output where logs should go. If syslog is enabled, data will
// be written to writer in addition to syslog.
Writer io.Writer
}
Config is the configuration for this log setup.
type SyslogWrapper ¶
type SyslogWrapper struct {
// contains filtered or unexported fields
}
SyslogWrapper is used to cleaup log messages before writing them to a Syslogger. Implements the io.Writer interface.
Click to show internal directories.
Click to hide internal directories.