Hi all! Thanks for the great software!

I came across a strange behavior: when I use `preconnect: :concurently` 
option for connection then `server_logging` extension doesn't work.

Here is an example:

# frozen_string_literal: true


require 'bundler/inline'


gemfile(true) do
  gem 'mysql2'
  gem 'sequel'
end


require 'logger'
require 'sequel'


DATABASE_URL = URI('mysql2://[email protected]:3306/sequel_test')
LOGGER = Logger.new(STDOUT)
LOGGER.level = 0


DB = Sequel.connect(
  DATABASE_URL.to_s,
  servers: {
    read_only: {
      host: DATABASE_URL.host,
      port: DATABASE_URL.port
    }
  },
  extensions: %i[
    error_sql
    server_block
    server_logging
    connection_validator
  ],
  loggers: LOGGER,
  log_connection_info: true,
  preconnect: :concurrently,
  max_connections: 10
)


DB.with_server(:default) do
  DB[:users].count
end

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to