Documentation ¶
Overview ¶
Teolog message logger extends standart go log with levels. There is there next levels from hi to low: NONE, ERROR, USER, INFO, CONNECT, DEBUG, DEBUGV, DEBUGVV, DEBUGVVV
Index ¶
- type Filter
- type LogLevel
- type Teolog
- func (l *Teolog) ClearFilter()
- func (l *Teolog) Filter() (str string)
- func (l *Teolog) Level() LogLevel
- func (l *Teolog) Levels() string
- func (l *Teolog) SetFilter(f interface{})
- func (l *Teolog) SetFlags(flag int)
- func (l *Teolog) SetLevel(leveli interface{})
- func (l *Teolog) String() string
- func (l *Teolog) SwitchLevel() LogLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
type LogLevel int
const ( None LogLevel = iota // No logs Error // Errors log (show only errors) User // User level log (show User logs and Error logs) Info // Info level (show Info, User and Error logs) Connect // Connect level (show connect, Info, User and Error logs) Debug // Debug level (show debug, connect, Info, User and Error logs) Debugv // Debugv level (show debugv, debug, connect, Info, User and Error logs) Debugvv // Debugvv level (show debugvv, debugv, debug, connect, Info, User and Error logs) Debugvvv // Debugvvv level (show debugvvv, debugvv, debugv, debug, connect, Info, User and Error logs) )
Log levels constant
type Teolog ¶
type Teolog struct { Error *log.Logger User *log.Logger Info *log.Logger Connect *log.Logger Debug *log.Logger Debugv *log.Logger Debugvv *log.Logger Debugvvv *log.Logger // contains filtered or unexported fields }
func (*Teolog) SetLevel ¶
func (l *Teolog) SetLevel(leveli interface{})
SetLevel set log level. There is there next levels from hi to low: NONE, ERROR, USER, INFO, CONNECT, DEBUG, DEBUGV, DEBUGVV, DEBUGVVV
func (*Teolog) SwitchLevel ¶
SwitchLevel switch level to nexet and return level number
Click to show internal directories.
Click to hide internal directories.