...

Package testingadapter

import "github.com/jackc/pgx/v5/log/testingadapter"
Overview
Index

Overview ▾

Package testingadapter provides a logger that writes to a test or benchmark log.

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 tracelog.LogLevel, msg string, data map[string]any)

type TestingLogger

TestingLogger interface defines the subset of testing.TB methods used by this adapter.

type TestingLogger interface {
    Log(args ...any)
}