Fix stdlib test logger
This commit is contained in:
+2
-11
@@ -335,17 +335,8 @@ type testLogger struct {
|
|||||||
logs []testLog
|
logs []testLog
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *testLogger) Debug(msg string, ctx ...interface{}) {
|
func (l *testLogger) Log(lvl int, msg string, ctx ...interface{}) {
|
||||||
l.logs = append(l.logs, testLog{lvl: pgx.LogLevelDebug, msg: msg, ctx: ctx})
|
l.logs = append(l.logs, testLog{lvl: lvl, msg: msg, ctx: ctx})
|
||||||
}
|
|
||||||
func (l *testLogger) Info(msg string, ctx ...interface{}) {
|
|
||||||
l.logs = append(l.logs, testLog{lvl: pgx.LogLevelInfo, msg: msg, ctx: ctx})
|
|
||||||
}
|
|
||||||
func (l *testLogger) Warn(msg string, ctx ...interface{}) {
|
|
||||||
l.logs = append(l.logs, testLog{lvl: pgx.LogLevelWarn, msg: msg, ctx: ctx})
|
|
||||||
}
|
|
||||||
func (l *testLogger) Error(msg string, ctx ...interface{}) {
|
|
||||||
l.logs = append(l.logs, testLog{lvl: pgx.LogLevelError, msg: msg, ctx: ctx})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestConnQueryLog(t *testing.T) {
|
func TestConnQueryLog(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user