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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user