Documentation ¶
Index ¶
- Constants
- type BeeLogger
- func (log *BeeLogger) Debug(v ...interface{})
- func (log *BeeLogger) Debugf(format string, v ...interface{})
- func (log *BeeLogger) Error(v ...interface{})
- func (log *BeeLogger) Errorf(format string, v ...interface{})
- func (log *BeeLogger) Info(v ...interface{})
- func (log *BeeLogger) Infof(format string, v ...interface{})
- func (log *BeeLogger) SetField(name string, value interface{})
- func (log *BeeLogger) Warn(v ...interface{})
- func (log *BeeLogger) Warnf(format string, v ...interface{})
- type Logger
- type LogrusLogger
Constants ¶
const (
// HomeDirFlag 当前用户家目录标识符
HomeDirFlag = "~"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeeLogger ¶
type BeeLogger struct {
// contains filtered or unexported fields
}
BeeLogger beego log实现
func (*BeeLogger) Debug ¶
func (log *BeeLogger) Debug(v ...interface{})
Debug logs a debug message. If last parameter is a map[string]string, it's content is added as fields to the message.
func (*BeeLogger) Debugf ¶
Debug logs a debug message with format. If last parameter is a map[string]string, it's content is added as fields to the message.
func (*BeeLogger) Error ¶
func (log *BeeLogger) Error(v ...interface{})
Error logs an error message. If last parameter is a map[string]string, it's content is added as fields to the message.
func (*BeeLogger) Errorf ¶
Error logs an error message with format. If last parameter is a map[string]string, it's content is added as fields to the message.
func (*BeeLogger) Info ¶
func (log *BeeLogger) Info(v ...interface{})
Info logs a info message. If last parameter is a map[string]string, it's content is added as fields to the message.
func (*BeeLogger) Infof ¶
Info logs a info message with format. If last parameter is a map[string]string, it's content is added as fields to the message.
type Logger ¶
type Logger interface { // SetField sets a field on the logger's context. All future messages on this logger // will have this field set. SetField(name string, value interface{}) // Debug logs a debug message. If last parameter is a map[string]string, it's content // is added as fields to the message. Debug(v ...interface{}) // Debug logs a debug message with format. If last parameter is a map[string]string, // it's content is added as fields to the message. Debugf(format string, v ...interface{}) // Info logs a info message. If last parameter is a map[string]string, it's content // is added as fields to the message. Info(v ...interface{}) // Info logs a info message with format. If last parameter is a map[string]string, // it's content is added as fields to the message. Infof(format string, v ...interface{}) // Warn logs a warning message. If last parameter is a map[string]string, it's content // is added as fields to the message. Warn(v ...interface{}) // Warn logs a warning message with format. If last parameter is a map[string]string, // it's content is added as fields to the message. Warnf(format string, v ...interface{}) // Error logs an error message. If last parameter is a map[string]string, it's content // is added as fields to the message. Error(v ...interface{}) // Error logs an error message with format. If last parameter is a map[string]string, // it's content is added as fields to the message. Errorf(format string, v ...interface{}) }
Logger 系统logger接口
type LogrusLogger ¶
func NewLogger ¶
func NewLogger() *LogrusLogger
func NewLogrusLogger ¶
func NewLogrusLogger(conf *config.Config) (logrusLogger *LogrusLogger)
func (*LogrusLogger) SetField ¶
func (log *LogrusLogger) SetField(key string, value interface{})