On Mon, Jan 5, 2015 at 9:20 AM, Lin Jen-Shin (godfat) <[email protected]>
wrote:

> On Tue, Jan 6, 2015 at 12:45 AM, Jeremy Evans <[email protected]>
> wrote:
> > You can use the connection_validator extension to check for valid
> > connections before using them. This will automatically disconnect and
> create
> > a new connection if the connection is not valid, since it does it at a
> point
> > where it is known to be safe (directly after connection checkout).
>
> Great, actually I was once thinking to do this by myself, but digging
> in the source,
> I didn't find a proper place to do this. Can we also put some logging for
> this?
>

There's nothing specifically logged when a connection is disconnected and a
new connection is made.  But it's fairly easy to add such logging yourself:

def DB.disconnect_connection(conn)
  super
  log_info("Disconnecting connection #{conn.object_id}")
end

def DB.connect(server)
  conn = super
  log_info("Creating new connection #{conn.object_id}")
  conn
end

Thanks,
Jeremy

-- 
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 http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to