title: Cannot use logrusadapter.NewLogger(logrusLogger) (value of type *logrusadapter.Logger)
body: <p>I'm following <a href="https://stackoverflow.com/questions/64504879/how-to-log-queries-with-pgx">this</a> SO question to implement a logger into my <code>pgx</code> connection since I'm getting a <code>closed pool</code> error on <code>Scan</code>.</p>
  <p>I'm getting this error in vscode.</p>
  <blockquote>
  <p>cannot use logrusadapter.NewLogger(logrusLogger) (value of type
  *logrusadapter.Logger) as &quot;github.com/jackc/pgx/v4&quot;.Logger value in assignment: wrong type for method Log (have func(level
  github.com/jackc/pgx.LogLevel, msg string, data
  map[string]interface{}), want func(ctx context.Context, level
  github.com/jackc/pgx/v4.LogLevel, msg string, data
  map[string]interface{}))</p>
  </blockquote>
  <pre><code>package main
  
  import (
      &quot;context&quot;
      &quot;log&quot;
      &quot;net/http&quot;
      &quot;os&quot;
  
      &quot;github.com/go-chi/chi&quot;
      &quot;github.com/go-chi/chi/middleware&quot;
      &quot;github.com/go-chi/jwtauth&quot;
      &quot;github.com/go-chi/render&quot;
      &quot;github.com/jackc/pgx/log/logrusadapter&quot;
      &quot;github.com/jackc/pgx/v4/pgxpool&quot;
      &quot;github.com/minio/minio-go/v7&quot;
      &quot;github.com/minio/minio-go/v7/pkg/credentials&quot;
      &quot;github.com/sirupsen/logrus&quot;
  )
  
  func router() http.Handler {
  
      var err error
  
      // urlExample := &quot;postgres://username:password@localhost:5432/database_name&quot;
  
      config, err := pgxpool.ParseConfig(os.Getenv(&quot;DATABASE_URL&quot;))
  
      if err != nil {
          log.Fatalln(err)
      }
  
      logrusLogger := &amp;logrus.Logger{
          Out:          os.Stderr,
          Formatter:    new(logrus.JSONFormatter),
          Hooks:        make(logrus.LevelHooks),
          Level:        logrus.InfoLevel,
          ExitFunc:     os.Exit,
          ReportCaller: false,
      }
      config.ConnConfig.Logger = logrusadapter.NewLogger(logrusLogger)
  
      db, err := pgxpool.ConnectConfig(context.Background(), config)
  
      if err != nil {
          log.Fatalln(err)
      }
  
      defer db.Close()
  </code></pre>