feat: 数据迁移新增实时日志&数据库游标遍历查询问题修复

This commit is contained in:
meilin.huang
2024-03-28 22:20:39 +08:00
parent 5e4793433b
commit d1d372e1bf
31 changed files with 477 additions and 344 deletions

View File

@@ -48,6 +48,10 @@ func DebugContext(ctx context.Context, msg string, args ...any) {
Log(ctx, slog.LevelDebug, msg, args...)
}
func DebugfContext(ctx context.Context, format string, args ...any) {
Log(ctx, slog.LevelDebug, fmt.Sprintf(format, args...))
}
func Debugf(format string, args ...any) {
Log(context.Background(), slog.LevelDebug, fmt.Sprintf(format, args...))
}
@@ -69,6 +73,10 @@ func InfoContext(ctx context.Context, msg string, args ...any) {
Log(ctx, slog.LevelInfo, msg, args...)
}
func InfofContext(ctx context.Context, format string, args ...any) {
Log(ctx, slog.LevelInfo, fmt.Sprintf(format, args...))
}
func Infof(format string, args ...any) {
Log(context.Background(), slog.LevelInfo, fmt.Sprintf(format, args...))
}
@@ -85,6 +93,10 @@ func WarnContext(ctx context.Context, msg string, args ...any) {
Log(ctx, slog.LevelWarn, msg, args...)
}
func WarnfContext(ctx context.Context, format string, args ...any) {
Log(ctx, slog.LevelWarn, fmt.Sprintf(format, args...))
}
func Warnf(format string, args ...any) {
Log(context.Background(), slog.LevelWarn, fmt.Sprintf(format, args...))
}
@@ -101,6 +113,10 @@ func ErrorContext(ctx context.Context, msg string, args ...any) {
Log(ctx, slog.LevelError, msg, args...)
}
func ErrorfContext(ctx context.Context, format string, args ...any) {
Log(ctx, slog.LevelError, fmt.Sprintf(format, args...))
}
func Errorf(format string, args ...any) {
Log(context.Background(), slog.LevelError, fmt.Sprintf(format, args...))
}