2
0

Added log adapter for logrus

Also changed standard logger interface to take a map instead of varargs for
extra data.
This commit is contained in:
Jack Christensen
2017-04-29 21:28:38 -05:00
parent 855b735eae
commit 280bce7078
13 changed files with 108 additions and 52 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ func (ll LogLevel) String() string {
// Logger is the interface used to get logging from pgx internals.
type Logger interface {
// Log a message at the given level with context key/value pairs
Log(level LogLevel, msg string, ctx ...interface{})
// Log a message at the given level with data key/value pairs. data may be nil.
Log(level LogLevel, msg string, data map[string]interface{})
}
// LogLevelFromString converts log level string to constant