Files
lijiaoqiao/gateway/internal/pkg/logging/logger.go
Your Name 687c4535f8 fix: P0-1 RateLimiter并发写安全 + P0-2工单操作错误码区分 + P1 rows.Close修复
P0-1 (limits.go): Allow()方法改为全程使用写锁保护counters map读写,避免RLock写入时的data race
P0-2 (ticket_workflow.go+ticket_handler.go): Assign/Resolve/Close操作先查询ticket存在性和状态,返回明确的CS_TICKET_4001/CS_TKT_4002/CS_TICKET_4092/CS_TICKET_4093错误码,handler根据错误前缀路由HTTP状态码
P1-1 (ticket_store.go): 移除GetStats中3处手动rows.Close(),只保留defer Close()
2026-05-01 20:56:25 +08:00

35 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Package logging — pkg/logging 兼容适配层
//
// 将原有实现迁移至 shared/logging本包保留以免破坏现有导入。
// 所有类型和函数均为 shared/logging 的重新导出。
package logging
import (
sharedlogging "lijiaoqiao/gateway/internal/shared/logging"
)
// 日志级别 — 从 shared/logging 重新导出
type LogLevel = sharedlogging.LogLevel
const (
LogLevelDebug = sharedlogging.LogLevelDebug
LogLevelInfo = sharedlogging.LogLevelInfo
LogLevelWarn = sharedlogging.LogLevelWarn
LogLevelError = sharedlogging.LogLevelError
LogLevelFatal = sharedlogging.LogLevelFatal
)
// LogEntry — 从 shared/logging 重新导出
type LogEntry = sharedlogging.LogEntry
// Logger — 从 shared/logging 重新导出
type Logger = sharedlogging.Logger
// SensitiveFields — 从 shared/logging 重新导出
var SensitiveFields = sharedlogging.SensitiveFields
// NewLogger 创建统一 JSON logger — 转发至 shared/logging
func NewLogger(service string, minLevel LogLevel) *Logger {
return sharedlogging.NewLogger(service, minLevel)
}