Documentation
¶
Index ¶
- type EsLogger
- func (l *EsLogger) Debug(msg string, a ...interface{})
- func (l *EsLogger) Error(msg string, a ...interface{})
- func (l *EsLogger) Fatal(msg string, a ...interface{})
- func (l *EsLogger) Info(msg string, a ...interface{})
- func (e *EsLogger) Init()
- func (l *EsLogger) Waring(msg string, a ...interface{})
- type FileLogger
- func (f *FileLogger) Close(file *os.File)
- func (l *FileLogger) Debug(msg string, a ...interface{})
- func (l *FileLogger) Error(msg string, a ...interface{})
- func (l FileLogger) Fatal(msg string, a ...interface{})
- func (l *FileLogger) Info(msg string, a ...interface{})
- func (l *FileLogger) Waring(msg string, a ...interface{})
- type Info
- type Level
- type Log
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EsLogger ¶ added in v1.3.0
type EsLogger struct {
Client *elastic.Client
Uri []string
Index string
UserName string
Password string
// contains filtered or unexported fields
}
func NewEsLogger ¶ added in v1.3.0
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
type Info ¶ added in v1.3.0
type Info struct {
FuncName string `json:"funcName"`
FileName string `json:"fileName"`
Line int64 `json:"line"`
Level string `json:"level"`
Message string `json:"message"` // 微博内容
Created time.Time `json:"created,omitempty"` // 创建时间
Location string `json:"location,omitempty"` //位置
Suggest *elastic.SuggestField `json:"suggest_field,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.