Versions in this module Expand all Collapse all v1 v1.0.2 Oct 19, 2024 Changes in this version + const LevelDebug + const LevelDebugWithSQL + const LevelError + const LevelFatal + const LevelInfo + const LevelPanic + const LevelWarn + func CInfo(ctx context.Context, msg string, keysAndValues ...any) + func InitConsoleLogger(moduleName string, logLevel int, isJson bool, moduleVersion string) error + func InitLoggerFromConfig(loggerPrefixName, moduleName string, sdkType, platformName string, ...) error + func SDKLog(ctx context.Context, logLevel int, file string, line int, msg string, ...) + func ZDebug(ctx context.Context, msg string, keysAndValues ...any) + func ZError(ctx context.Context, msg string, err error, keysAndValues ...any) + func ZInfo(ctx context.Context, msg string, keysAndValues ...any) + func ZWarn(ctx context.Context, msg string, err error, keysAndValues ...any) + type Color uint8 + const Black + const Blue + const Cyan + const Green + const Magenta + const Red + const White + const Yellow + func (c Color) Add(s string) string + type LogFormatter interface + Format func() any + type Logger interface + Debug func(ctx context.Context, msg string, keysAndValues ...any) + Error func(ctx context.Context, msg string, err error, keysAndValues ...any) + Info func(ctx context.Context, msg string, keysAndValues ...any) + Warn func(ctx context.Context, msg string, err error, keysAndValues ...any) + WithCallDepth func(depth int) Logger + WithName func(name string) Logger + WithValues func(keysAndValues ...any) Logger + type SqlLogger struct + IgnoreRecordNotFoundError bool + LogLevel gormLogger.LogLevel + SlowThreshold time.Duration + func NewSqlLogger(logLevel gormLogger.LogLevel, ignoreRecordNotFoundError bool, ...) *SqlLogger + func (SqlLogger) Error(ctx context.Context, msg string, args ...any) + func (SqlLogger) Info(ctx context.Context, msg string, args ...any) + func (SqlLogger) Warn(ctx context.Context, msg string, args ...any) + func (l *SqlLogger) LogMode(logLevel gormLogger.LogLevel) gormLogger.Interface + func (l *SqlLogger) Trace(ctx context.Context, begin time.Time, ...) + type ZapLogger struct + func NewConsoleZapLogger(moduleName string, logLevel int, isJson bool, moduleVersion string, ...) (*ZapLogger, error) + func NewZapLogger(loggerPrefixName, moduleName string, sdkType, platformName string, ...) (*ZapLogger, error) + func (l *ZapLogger) Debug(ctx context.Context, msg string, keysAndValues ...any) + func (l *ZapLogger) Error(ctx context.Context, msg string, err error, keysAndValues ...any) + func (l *ZapLogger) Info(ctx context.Context, msg string, keysAndValues ...any) + func (l *ZapLogger) ToZap() *zap.SugaredLogger + func (l *ZapLogger) Warn(ctx context.Context, msg string, err error, keysAndValues ...any) + func (l *ZapLogger) WithCallDepth(depth int) Logger + func (l *ZapLogger) WithName(name string) Logger + func (l *ZapLogger) WithValues(keysAndValues ...any) Logger + type ZkLogger struct + func NewZkLogger() *ZkLogger + func (l *ZkLogger) Printf(format string, a ...any)