Documentation
¶
Index ¶
Constants ¶
View Source
const ( CtxLogKey = util.CtxKey("ctxLogKey") LogTargetOS = "os" )
View Source
const LogTargetFluent = "fluent"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
Info(msg string)
Debug(msg string)
Warn(msg string)
Err(msg string)
Fatal(msg string)
}
func GetLogByCtx ¶ added in v1.0.0
func GetLogByGin ¶ added in v1.4.0
func GetLogByReq ¶ added in v1.0.0
type LoggerConf ¶
type LoggerConf struct {
Level string `yaml:"-"`
Target string `yaml:"-"`
FluentLog *fluentLog `yaml:"fluent,omitempty"`
}
func (*LoggerConf) NewLogger ¶
func (lc *LoggerConf) NewLogger(key string) Logger
Click to show internal directories.
Click to hide internal directories.