Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

Commit 2be4b58

Browse files
committed
🌽 Minor fixes
- remove unused field - more useful debug in log
1 parent 2abdd31 commit 2be4b58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

orm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ type (
1919
Database string
2020
Debug bool
2121
PoolSize int
22-
Logger *zap.Logger
2322
Options map[string]string
2423
}
2524

@@ -154,7 +153,8 @@ func NewConnection(cfg *Config, l *zap.Logger) (db *pg.DB, err error) {
154153
zap.Duration("query_time", time.Since(h.StartAt)),
155154
zap.Int("attempt", e.Attempt),
156155
zap.Any("params", e.Params),
157-
zap.Error(qErr))
156+
zap.NamedError("format_error", qErr),
157+
zap.Error(e.Error))
158158
}
159159
db.AddQueryHook(h)
160160
}

0 commit comments

Comments
 (0)