2
0

Add log adapters for testing and log15

Make LogLevel a type for Stringer interface.
This commit is contained in:
Jack Christensen
2017-04-29 20:33:52 -05:00
parent 353ca7c5c7
commit 855b735eae
8 changed files with 103 additions and 30 deletions
+2 -2
View File
@@ -365,7 +365,7 @@ func TestConnQuery(t *testing.T) {
}
type testLog struct {
lvl int
lvl pgx.LogLevel
msg string
ctx []interface{}
}
@@ -374,7 +374,7 @@ type testLogger struct {
logs []testLog
}
func (l *testLogger) Log(lvl int, msg string, ctx ...interface{}) {
func (l *testLogger) Log(lvl pgx.LogLevel, msg string, ctx ...interface{}) {
l.logs = append(l.logs, testLog{lvl: lvl, msg: msg, ctx: ctx})
}