package testingadapter
import "github.com/jackc/pgx/v4/log/testingadapter"
Package testingadapter provides a logger that writes to a test or benchmark log.
Index ¶
- type Logger
- func NewLogger(l TestingLogger) *Logger
- func (l *Logger) Log(ctx context.Context, level pgx.LogLevel, msg string, data map[string]interface{})
- type TestingLogger
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(l TestingLogger) *Logger
func (*Logger) Log ¶
func (l *Logger) Log(ctx context.Context, level pgx.LogLevel, msg string, data map[string]interface{})
type TestingLogger ¶
type TestingLogger interface {
Log(args ...interface{})
}
TestingLogger interface defines the subset of testing.TB methods used by this adapter.
Source Files ¶
- Version
- v4.4.0
- Published
- Feb 5, 2020
- Platform
- darwin/amd64
- Imports
- 3 packages
- Last checked
- 5 minutes ago –
Tools for package owners.