Documentation
¶
Index ¶
- Variables
- func DecorateLog(logger *log.Entry) *log.Entry
- func GenReqID() string
- func SetFormat(format string, logger *Logger)
- func SetLogLevel(level string, logger *Logger)
- func SetOutput(output string, logger *Logger)
- func SetOutputFile(fileName string, logger *Logger)
- type Hook
- type LogMessage
- type Logger
- func (logger *Logger) AddHook(hook Hook) *Logger
- func (logger *Logger) Debug(args ...interface{})
- func (logger *Logger) Debugf(format string, args ...interface{})
- func (logger *Logger) Error(args ...interface{})
- func (logger *Logger) Errorf(format string, args ...interface{})
- func (logger *Logger) Fatal(args ...interface{})
- func (logger *Logger) Fatalf(format string, args ...interface{})
- func (logger *Logger) Info(args ...interface{})
- func (logger *Logger) Infof(format string, args ...interface{})
- func (logger *Logger) Panic(args ...interface{})
- func (logger *Logger) Panicf(format string, args ...interface{})
- func (logger *Logger) ReqID() string
- func (logger *Logger) SetLevel(level log.Level)
- func (logger *Logger) SetOutput(out io.Writer)
- func (logger *Logger) Warn(args ...interface{})
- func (logger *Logger) Warnf(format string, args ...interface{})
- func (logger *Logger) WithFields(fields map[string]interface{}) *log.Entry
- func (logger *Logger) Xput(logs []string)
- type LoggerFields
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// RequestIDKey RequestID fields
RequestIDKey = "x-reqid"
)
Functions ¶
func SetOutputFile ¶
SetOutputFile set logger file
Types ¶
type LogMessage ¶
LogMessage async logger data
type Logger ¶
Logger logrus realize
var (
StdLog *Logger
)
logger constant
func New ¶
func New(o ...interface{}) *Logger
New this function is recommended to create a new logger object
func NewEmptyLoggerWithFields ¶
NewEmptyLoggerWithFields ..
func (*Logger) WithFields ¶
WithFields ..
Click to show internal directories.
Click to hide internal directories.