Documentation ¶
Overview ¶
Logging provider
Log only fully init when app.Run() called
Index ¶
- Variables
- func CustomMessageLoggerWithSentryDSN(dsn string) *messageLogger
- func CustomStdLoggerWithSentryDSN(dsn string) *stdLogger
- func InitServLogger(allowFileLogger bool)
- func InitServLoggerWithSentryDSN(allowFileLogger bool, dsn string)
- func NewAppLogService(config *Config) *stdLogger
- func NewMessageLogService(config *Config) *messageLogger
- type Config
- type Fields
- type Logger
- type ServiceLogger
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 CustomMessageLoggerWithSentryDSN ¶ added in v1.0.2
func CustomMessageLoggerWithSentryDSN(dsn string) *messageLogger
func CustomStdLoggerWithSentryDSN ¶ added in v1.0.2
func CustomStdLoggerWithSentryDSN(dsn string) *stdLogger
func InitServLogger ¶
func InitServLogger(allowFileLogger bool)
func InitServLoggerWithSentryDSN ¶ added in v1.0.2
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.