Documentation ¶
Index ¶
- Variables
- type Level
- type LoggingConfig
- type Manager
- func (logger *Manager) ApplyConfig(config []LoggingConfig) error
- func (logger *Manager) Debug(logType string, messageParts ...string)
- func (logger *Manager) Error(logType string, messageParts ...string)
- func (logger *Manager) Info(logType string, messageParts ...string)
- func (logger *Manager) IsLoggingRawIO() bool
- func (logger *Manager) Log(level Level, logType string, messageParts ...string)
- func (logger *Manager) Warning(logType string, messageParts ...string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LogLevelNames takes a config name and gives the real log level. LogLevelNames = map[string]Level{ "debug": LogDebug, "info": LogInfo, "warn": LogWarning, "warning": LogWarning, "warnings": LogWarning, "error": LogError, "errors": LogError, } // LogLevelDisplayNames gives the display name to use for our log levels. LogLevelDisplayNames = map[Level]string{ LogDebug: "debug", LogInfo: "info", LogWarning: "warning", LogError: "error", } )
Functions ¶
This section is empty.
Types ¶
type LoggingConfig ¶ added in v0.10.0
type LoggingConfig struct { Method string MethodStdout bool MethodStderr bool MethodFile bool Filename string TypeString string `yaml:"type"` Types []string `yaml:"real-types"` ExcludedTypes []string `yaml:"real-excluded-types"` LevelString string `yaml:"level"` Level Level `yaml:"level-real"` }
LoggingConfig represents the configuration of a single logger.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the main interface used to log debug/info/error messages.
func NewManager ¶
func NewManager(config []LoggingConfig) (*Manager, error)
NewManager returns a new log manager.
func (*Manager) ApplyConfig ¶ added in v0.10.0
func (logger *Manager) ApplyConfig(config []LoggingConfig) error
ApplyConfig applies the given config to this logger (rehashes the config, in other words).
func (*Manager) IsLoggingRawIO ¶ added in v0.10.0
IsLoggingRawIO returns true if raw user input and output is being logged.
Click to show internal directories.
Click to hide internal directories.