Documentation ¶
Index ¶
- 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
- type Logger
- type SqlLogger
- func (SqlLogger) Error(ctx context.Context, msg string, args ...interface{})
- func (SqlLogger) Info(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, ...)
- func (SqlLogger) Warn(ctx context.Context, msg string, args ...interface{})
- type ZapLogger
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Debug(ctx context.Context, msg string, keysAndValues ...interface{}) Info(ctx context.Context, msg string, keysAndValues ...interface{}) Warn(ctx context.Context, msg string, err error, keysAndValues ...interface{}) Error(ctx context.Context, msg string, err error, keysAndValues ...interface{}) WithValues(keysAndValues ...interface{}) Logger WithName(name string) Logger WithCallDepth(depth int) Logger }
type SqlLogger ¶
type SqlLogger struct { LogLevel gormLogger.LogLevel IgnoreRecordNotFoundError bool SlowThreshold time.Duration }
func NewSqlLogger ¶
func (*SqlLogger) LogMode ¶
func (l *SqlLogger) LogMode(logLevel gormLogger.LogLevel) gormLogger.Interface
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
func NewZapLogger ¶
func (*ZapLogger) ToZap ¶
func (l *ZapLogger) ToZap() *zap.SugaredLogger
func (*ZapLogger) WithCallDepth ¶
func (*ZapLogger) WithValues ¶
Click to show internal directories.
Click to hide internal directories.