Versions in this module Expand all Collapse all v1 v1.0.1 Aug 31, 2023 Changes in this version + func InitFromConfig(loggerPrefixName, moduleName string, logLevel int, isStdout bool, isJson bool, ...) error + func ZDebug(ctx context.Context, msg string, keysAndValues ...interface{}) + func ZError(ctx context.Context, msg string, err error, keysAndValues ...interface{}) + func ZInfo(ctx context.Context, msg string, keysAndValues ...interface{}) + func ZWarn(ctx context.Context, msg string, err error, keysAndValues ...interface{}) + 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 Logger interface + Debug func(ctx context.Context, msg string, keysAndValues ...interface{}) + Error func(ctx context.Context, msg string, err error, keysAndValues ...interface{}) + Info func(ctx context.Context, msg string, keysAndValues ...interface{}) + Warn func(ctx context.Context, msg string, err error, keysAndValues ...interface{}) + WithCallDepth func(depth int) Logger + WithName func(name string) Logger + WithValues func(keysAndValues ...interface{}) 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 ...interface{}) + func (SqlLogger) Info(ctx context.Context, msg string, args ...interface{}) + func (SqlLogger) Warn(ctx context.Context, msg string, args ...interface{}) + func (l *SqlLogger) LogMode(logLevel gormLogger.LogLevel) gormLogger.Interface + func (l *SqlLogger) Trace(ctx context.Context, begin time.Time, ...) + type ZapLogger struct + func NewZapLogger(loggerPrefixName, loggerName string, logLevel int, isStdout bool, isJson bool, ...) (*ZapLogger, error) + func (l *ZapLogger) Debug(ctx context.Context, msg string, keysAndValues ...interface{}) + func (l *ZapLogger) Error(ctx context.Context, msg string, err error, keysAndValues ...interface{}) + func (l *ZapLogger) Info(ctx context.Context, msg string, keysAndValues ...interface{}) + func (l *ZapLogger) ToZap() *zap.SugaredLogger + func (l *ZapLogger) Warn(ctx context.Context, msg string, err error, keysAndValues ...interface{}) + func (l *ZapLogger) WithCallDepth(depth int) Logger + func (l *ZapLogger) WithName(name string) Logger + func (l *ZapLogger) WithValues(keysAndValues ...interface{}) Logger + type ZkLogger struct + func NewZkLogger() *ZkLogger + func (l *ZkLogger) Printf(format string, a ...interface{})