Documentation ¶
Index ¶
- Constants
- type HiedaLogBackend
- type HiedaLogBackendConfig
- type HiedaLogLevel
- type HiedaLogLevelFilter
- func (f *HiedaLogLevelFilter) CanEmit(name string, reflevel uint8) bool
- func (f *HiedaLogLevelFilter) CanEmitEx(name string, reflevel uint8) (bool, HiedaLogLevel)
- func (f *HiedaLogLevelFilter) GetLevelList() []HiedaLogLevel
- func (f *HiedaLogLevelFilter) NameToID(name string) uint8
- func (f *HiedaLogLevelFilter) NameToLevel(name string) HiedaLogLevel
- type HiedaLogger
- func (l *HiedaLogger) AddBackend(backend HiedaLogBackend, filterLevelID uint8)
- func (l *HiedaLogger) EmitComplexLog(module string, level HiedaLogLevel, data map[string]string)
- func (l *HiedaLogger) EmitStringLog(module string, level HiedaLogLevel, content string)
- func (l *HiedaLogger) LogComplex(module, levelName string, data map[string]string)
- func (l *HiedaLogger) LogPrint(module, level string, d ...interface{})
- func (l *HiedaLogger) LogPrintf(module, level, format string, d ...interface{})
- func (l *HiedaLogger) LogString(module, levelName, content string)
Constants ¶
View Source
const ( DLN_FATAL = "FATAL" DLN_PANIC = "PANIC" DLN_ERROR = "ERROR" DLN_WARN = "WARN" DLN_INFO = "INFO" DLN_VERBOSE = "VERBOSE" DLN_DEBUG = "DEBUG" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HiedaLogBackend ¶
type HiedaLogBackend interface { EmitStringLog(module string, level HiedaLogLevel, content string) EmitComplexLog(module string, level HiedaLogLevel, data map[string]string) }
type HiedaLogBackendConfig ¶
type HiedaLogBackendConfig struct { Backend HiedaLogBackend FilterLevelID uint8 }
type HiedaLogLevel ¶
type HiedaLogLevelFilter ¶
type HiedaLogLevelFilter struct {
// contains filtered or unexported fields
}
func NewDefaultLevelFilter ¶
func NewDefaultLevelFilter() HiedaLogLevelFilter
func NewLevelFilter ¶
func NewLevelFilter(levelList []HiedaLogLevel, defaultLevelID uint8) HiedaLogLevelFilter
func (*HiedaLogLevelFilter) CanEmit ¶
func (f *HiedaLogLevelFilter) CanEmit(name string, reflevel uint8) bool
func (*HiedaLogLevelFilter) CanEmitEx ¶
func (f *HiedaLogLevelFilter) CanEmitEx(name string, reflevel uint8) (bool, HiedaLogLevel)
func (*HiedaLogLevelFilter) GetLevelList ¶
func (f *HiedaLogLevelFilter) GetLevelList() []HiedaLogLevel
func (*HiedaLogLevelFilter) NameToID ¶
func (f *HiedaLogLevelFilter) NameToID(name string) uint8
func (*HiedaLogLevelFilter) NameToLevel ¶
func (f *HiedaLogLevelFilter) NameToLevel(name string) HiedaLogLevel
type HiedaLogger ¶
type HiedaLogger struct { BackendConfigs []HiedaLogBackendConfig LevelFilter HiedaLogLevelFilter }
func NewHiedaLogger ¶
func NewHiedaLogger() *HiedaLogger
func (*HiedaLogger) AddBackend ¶
func (l *HiedaLogger) AddBackend(backend HiedaLogBackend, filterLevelID uint8)
func (*HiedaLogger) EmitComplexLog ¶
func (l *HiedaLogger) EmitComplexLog(module string, level HiedaLogLevel, data map[string]string)
func (*HiedaLogger) EmitStringLog ¶
func (l *HiedaLogger) EmitStringLog(module string, level HiedaLogLevel, content string)
func (*HiedaLogger) LogComplex ¶
func (l *HiedaLogger) LogComplex(module, levelName string, data map[string]string)
func (*HiedaLogger) LogPrint ¶
func (l *HiedaLogger) LogPrint(module, level string, d ...interface{})
func (*HiedaLogger) LogPrintf ¶
func (l *HiedaLogger) LogPrintf(module, level, format string, d ...interface{})
func (*HiedaLogger) LogString ¶
func (l *HiedaLogger) LogString(module, levelName, content string)
Click to show internal directories.
Click to hide internal directories.