Documentation ¶
Overview ¶
Logging provider
Log only fully init when app.Run() called
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultMessageLogger = NewMessageLogService(&Config{
BasePrefix: "core",
DefaultLevel: "info",
})
)
View Source
var (
DefaultStdLogger = NewAppLogService(&Config{
BasePrefix: "core",
DefaultLevel: "trace",
})
)
Functions ¶
func InitServLogger ¶
func InitServLogger(allowFileLogger bool)
func NewAppLogService ¶
func NewAppLogService(config *Config) *stdLogger
func NewMessageLogService ¶
func NewMessageLogService(config *Config) *messageLogger
Types ¶
type Logger ¶
type Logger interface { Print(args ...interface{}) Debug(...interface{}) Debugln(...interface{}) Debugf(string, ...interface{}) Info(...interface{}) Infoln(...interface{}) Infof(string, ...interface{}) Warn(...interface{}) Warnln(...interface{}) Warnf(string, ...interface{}) Error(...interface{}) Errorln(...interface{}) Errorf(string, ...interface{}) Fatal(...interface{}) Fatalln(...interface{}) Fatalf(string, ...interface{}) Panic(...interface{}) Panicln(...interface{}) Panicf(string, ...interface{}) With(key string, value interface{}) Logger Withs(Fields) Logger // add source field to log WithSrc() Logger GetLevel() string }
type ServiceLogger ¶
func GetCurrent ¶
func GetCurrent() ServiceLogger
Click to show internal directories.
Click to hide internal directories.