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 tracelog.LogLevel, msg string, data map[string]any)
- type TestingLogger
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(l TestingLogger) *Logger
func (*Logger) Log ¶
type TestingLogger ¶
type TestingLogger interface { Log(args ...any) }
TestingLogger interface defines the subset of testing.TB methods used by this adapter.
Source Files ¶
- Version
- v5.7.2 (latest)
- Published
- Dec 21, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 5 days ago –
Tools for package owners.