Documentation ¶
Index ¶
- Variables
- func DecorateLog(logger *log.Entry) *log.Entry
- type ConfigType
- type Hook
- type Log
- func (logger *Log) AddDefaultHook() *Log
- func (logger *Log) AddHook(hook Hook) *Log
- func (logger *Log) Debug(args ...interface{})
- func (logger *Log) Debugf(format string, args ...interface{})
- func (logger *Log) Error(args ...interface{})
- func (logger *Log) Errorf(format string, args ...interface{})
- func (logger *Log) Fatal(args ...interface{})
- func (logger *Log) Fatalf(format string, args ...interface{})
- func (logger *Log) Info(args ...interface{})
- func (logger *Log) Infof(format string, args ...interface{})
- func (logger *Log) Panic(args ...interface{})
- func (logger *Log) Panicf(format string, args ...interface{})
- func (logger *Log) ReqId() string
- func (logger *Log) SetFormat(format string)
- func (logger *Log) SetLevel(level log.Level)
- func (logger *Log) SetLogLevel(level string)
- func (logger *Log) SetOutput(output string)
- func (logger *Log) SetOutputWriter(out io.Writer)
- func (logger *Log) Warn(args ...interface{})
- func (logger *Log) Warnf(format string, args ...interface{})
- func (logger *Log) WithFields(fields map[string]interface{})
- func (logger *Log) WithFieldsNewLog(fields map[string]interface{}) (entry *log.Entry)
- type LogFields
- type Logger
- type Requester
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithHook bool LogHook Hook )
Functions ¶
Types ¶
type ConfigType ¶
type ConfigType struct { Level string `toml:"level"` Format string `toml:"format"` Output string `toml:"output"` }
var Config *ConfigType
type Log ¶
type Log struct { LogEntry *log.Entry `json:"log_entry" plate:"log_entry,mid"` // contains filtered or unexported fields }
var (
StdLog *Log
)
func NewEmptyLogger ¶
func NewEmptyLogger() *Log
func (*Log) AddDefaultHook ¶
func (*Log) SetLogLevel ¶
func (*Log) SetOutputWriter ¶
SetOutput sets the standard logger output.
func (*Log) WithFields ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) ReqId() string }
Click to show internal directories.
Click to hide internal directories.