Documentation ¶
Index ¶
- Variables
- type Auditor
- type CallerHook
- type SeeleLog
- func (p *SeeleLog) Debug(format string, args ...interface{})
- func (p *SeeleLog) Error(format string, args ...interface{})
- func (p *SeeleLog) Fatal(format string, args ...interface{})
- func (p *SeeleLog) GetLevel() logrus.Level
- func (p *SeeleLog) Info(format string, args ...interface{})
- func (p *SeeleLog) Panic(format string, args ...interface{})
- func (p *SeeleLog) SetLevel(level logrus.Level)
- func (p *SeeleLog) Warn(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
var ( // LogFolder the default folder to write logs LogFolder = filepath.Join(common.GetTempFolder(), "log") )
Functions ¶
This section is empty.
Types ¶
type Auditor ¶
type Auditor struct {
// contains filtered or unexported fields
}
Auditor is used for auditing step by step via log.
func NewAuditor ¶
NewAuditor returns a new auditor instance with specified log and an optional last time.
func (*Auditor) AuditEnter ¶
AuditEnter adds log for method enter.
type CallerHook ¶
type CallerHook struct {
// contains filtered or unexported fields
}
CallerHook a caller hook of logrus
func (*CallerHook) Fire ¶
func (hook *CallerHook) Fire(entry *logrus.Entry) error
Fire adds a caller field in logger instance
func (*CallerHook) Levels ¶
func (hook *CallerHook) Levels() []logrus.Level
Levels returns supported levels
type SeeleLog ¶
type SeeleLog struct {
// contains filtered or unexported fields
}
SeeleLog wraps log class
func GetLogger ¶
GetLogger gets logrus.Logger object according to module name each module can have its own logger
func (*SeeleLog) Error ¶
Error Level. Error logs and is used for errors that should be definitely noted. Commonly used for hooks to send errors to an error tracking service.
func (*SeeleLog) Fatal ¶
Fatal Level. Fatal logs and then calls `os.Exit(1)`. It will exit even if the logging level is set to Panic.
func (*SeeleLog) Info ¶
Info Level. General operational entries about what's going on inside the application.
func (*SeeleLog) Panic ¶
Panic Level, highest level of severity. Panic logs and then calls panic with the message passed to Debug, Info, ...