优化结构

This commit is contained in:
Yvan
2026-08-21 00:28:09 +08:00
parent 361a562f75
commit 13f4589a18
21 changed files with 32 additions and 506 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ type Options struct {
}
// ErrorEntry is the storage-neutral representation of an Error-level log.
// Keeping it in internal/logging lets the log core report failures without taking a
// Keeping it in pkg/logging lets the log core report failures without taking a
// dependency on the application service or persistence layers.
type ErrorEntry struct {
Form, Info, Level, RequestID, TraceID string
@@ -264,7 +264,7 @@ func isGORMLoggerEntry(filename string, fields []zapcore.Field) bool {
}
normalized := strings.ReplaceAll(filename, "\\", "/")
return strings.HasSuffix(normalized, "/gorm_logger_writer.go") ||
strings.HasSuffix(normalized, "/internal/data/gorm_logger.go")
strings.HasSuffix(normalized, "/pkg/database/gormkit/logger.go")
}
func errorEntryFromZap(entry zapcore.Entry, fields []zapcore.Field) ErrorEntry {