Versions in this module Expand all Collapse all v1 v1.1.5 Dec 22, 2023 v1.0.0 Dec 22, 2023 Changes in this version + const FLAG_EMPTY + const FLAG_LOGGER_TYPE + const FLAG_SERVICE_NAME + const LEVEL_DEBUG + const LEVEL_ERROR + const LEVEL_INFO + const LEVEL_WARN + const LOGGER_ACCESS_TYPE + const LOGGER_BUSINESS_TYPE + const LOGGER_ERR_TYPE + const LOG_CALLER_SKIP + const ZEROLOG_CALLER_SKIP + func InitGlobalConfig(rootPath string, level string, appName string) error + type EmptyLoggerContext struct + func (*EmptyLoggerContext) RequestId(requestId string) LoggerContextIface + func (*EmptyLoggerContext) Tag(tag string) LoggerContextIface + func (*EmptyLoggerContext) WithCaller(skip int) LoggerContextIface + func (*EmptyLoggerContext) WithCommonFields(fields Fields) LoggerContextIface + func (*EmptyLoggerContext) WithContext(ctx context.Context) LoggerContextIface + func (*EmptyLoggerContext) WithFields(fields Fields) LoggerContextIface + func (*EmptyLoggerContext) WithLogData(logData *LogData) LoggerContextIface + func (e *EmptyLoggerContext) Debug(ctx context.Context, msg ...interface{}) + func (e *EmptyLoggerContext) Debugf(ctx context.Context, format string, args ...interface{}) + func (e *EmptyLoggerContext) Error(ctx context.Context, msg ...interface{}) + func (e *EmptyLoggerContext) Errorf(ctx context.Context, format string, args ...interface{}) + func (e *EmptyLoggerContext) GetDebugLog() *zerolog.Event + func (e *EmptyLoggerContext) GetErrorLog() *zerolog.Event + func (e *EmptyLoggerContext) GetInfoLog() *zerolog.Event + func (e *EmptyLoggerContext) GetLoggerConf() LoggerConf + func (e *EmptyLoggerContext) GetWarnLog() *zerolog.Event + func (e *EmptyLoggerContext) Info(ctx context.Context, msg ...interface{}) + func (e *EmptyLoggerContext) Infof(ctx context.Context, format string, args ...interface{}) + func (e *EmptyLoggerContext) Warn(ctx context.Context, msg ...interface{}) + func (e *EmptyLoggerContext) Warnf(ctx context.Context, format string, args ...interface{}) + type Fields = map[string]interface + type LogData struct + Attach map[string]interface{} + RequestId string + TraceId string + type LoggerConf struct + AppName string + Caller bool + ContextCall func(l *LoggerContext, ctx context.Context) LoggerContextIface + HideTime bool + Level uint8 + LogFilePath string + type LoggerContext struct + func GetAccessLogger(loggerTag string) (*LoggerContext, error) + func GetBusinessLogger(loggerTag string) (*LoggerContext, error) + func GetCustomLogger(customTag, loggerTag string) (*LoggerContext, error) + func GetErrLogger(loggerTag string) (*LoggerContext, error) + func (l *LoggerContext) Debug(ctx context.Context, args ...interface{}) + func (l *LoggerContext) Debugf(ctx context.Context, format string, args ...interface{}) + func (l *LoggerContext) Error(ctx context.Context, args ...interface{}) + func (l *LoggerContext) Errorf(ctx context.Context, format string, args ...interface{}) + func (l *LoggerContext) GetDebugLog() *zerolog.Event + func (l *LoggerContext) GetErrorLog() *zerolog.Event + func (l *LoggerContext) GetInfoLog() *zerolog.Event + func (l *LoggerContext) GetLoggerConf() LoggerConf + func (l *LoggerContext) GetWarnLog() *zerolog.Event + func (l *LoggerContext) Info(ctx context.Context, args ...interface{}) + func (l *LoggerContext) Infof(ctx context.Context, format string, args ...interface{}) + func (l *LoggerContext) RequestId(requestId string) LoggerContextIface + func (l *LoggerContext) Tag(tag string) LoggerContextIface + func (l *LoggerContext) Warn(ctx context.Context, args ...interface{}) + func (l *LoggerContext) Warnf(ctx context.Context, format string, args ...interface{}) + func (l *LoggerContext) WithCaller(skip int) LoggerContextIface + func (l *LoggerContext) WithCommonFields(commonFields Fields) LoggerContextIface + func (l *LoggerContext) WithContext(ctx context.Context) LoggerContextIface + func (l *LoggerContext) WithFields(fields Fields) LoggerContextIface + func (l *LoggerContext) WithLogData(logData *LogData) LoggerContextIface + type LoggerContextIface interface + Debug func(ctx context.Context, args ...interface{}) + Debugf func(ctx context.Context, format string, args ...interface{}) + Error func(ctx context.Context, args ...interface{}) + Errorf func(ctx context.Context, format string, args ...interface{}) + GetDebugLog func() *zerolog.Event + GetErrorLog func() *zerolog.Event + GetInfoLog func() *zerolog.Event + GetLoggerConf func() LoggerConf + GetWarnLog func() *zerolog.Event + Info func(ctx context.Context, args ...interface{}) + Infof func(ctx context.Context, format string, args ...interface{}) + RequestId func(requestId string) LoggerContextIface + Tag func(tag string) LoggerContextIface + Warn func(ctx context.Context, args ...interface{}) + Warnf func(ctx context.Context, format string, args ...interface{}) + WithCaller func(skip int) LoggerContextIface + WithCommonFields func(commonFields Fields) LoggerContextIface + WithContext func(ctx context.Context) LoggerContextIface + WithFields func(fields Fields) LoggerContextIface + WithLogData func(logData *LogData) LoggerContextIface + func CreateLogger(logConf LoggerConf) (LoggerContextIface, error)