Documentation
¶
Index ¶
- Variables
- type Config
- type Level
- type Manager
- func (logger *Manager) Debug(logType string, messageParts ...string)
- func (logger *Manager) Error(logType string, messageParts ...string)
- func (logger *Manager) Fatal(logType string, messageParts ...string)
- func (logger *Manager) Info(logType string, messageParts ...string)
- 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 Config ¶
type Config struct {
// logging methods
MethodStdout bool
MethodStderr bool
MethodFile bool
Filename string
// logging level
Level Level
// logging types
Types []string
ExcludedTypes []string
}
Config represents the configuration of a single logger.
type Manager ¶
type Manager struct {
DumpingRawInOut bool
// contains filtered or unexported fields
}
Manager is the main interface used to log debug/info/error messages.
func NewManager ¶
NewManager returns a new log manager.
Click to show internal directories.
Click to hide internal directories.