Documentation ¶
Index ¶
- func AddHookToElastic(indexName string, host string, logLevel logrus.Level, elasticHost string, ...)
- func DefaultXlogFormatter()
- func GetFormatter() logrus.Formatter
- func SetFormatter(format logrus.Formatter)
- type XLog
- func (xlog XLog) Debug(message string)
- func (xlog XLog) Debugf(format string, a ...interface{})
- func (xlog XLog) Error(message string)
- func (xlog XLog) Errorf(format string, a ...interface{})
- func (xlog XLog) Fatal(message string)
- func (xlog XLog) Fatalf(format string, a ...interface{})
- func (xlog XLog) Info(message string)
- func (xlog XLog) Infof(format string, a ...interface{})
- func (xlog XLog) Panic(message string)
- func (xlog XLog) Panicf(message string, a ...interface{})
- func (xlog XLog) SetField(fieldName string, value interface{}) *XLog
- func (xlog XLog) Trace(message string)
- func (xlog XLog) Tracef(format string, a ...interface{})
- func (xlog XLog) Warn(message string)
- func (xlog XLog) Warnf(format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHookToElastic ¶
func AddHookToElastic(indexName string, host string, logLevel logrus.Level, elasticHost string, elasticUsername string, elasticPassword string)
AddHookToElastic create hook for push log to elastic host
func DefaultXlogFormatter ¶
func DefaultXlogFormatter()
DefaultXlogFormatter set Formatter with TextFormatter that XLOG like. You can use logrus package to set it with yourself
func GetFormatter ¶
GetFormatter return Formatter that use by XLOG
Types ¶
type XLog ¶
type XLog struct {
// contains filtered or unexported fields
}
XLog struct contain logrus fields
Click to show internal directories.
Click to hide internal directories.