package testingadapter
import "github.com/jackc/pgx/v5/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
- v5.0.0-alpha.2
- Published
- Apr 2, 2022
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 24 minutes ago –
Tools for package owners.