Skip to content

Commit

Permalink
[#16] .Update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasObenaus committed Feb 18, 2020
1 parent a6c3b9c commit 2162508
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (p *pool) purge() {
for _, idleConnection := range p.idleConnections {
// If the client has an error then exclude it from the pool
if err := idleConnection.pc.client.LastError(); err != nil {
p.logger.Error().Err(err).Msg("Dismiss connection due to an error")
p.logger.Info().Msg("Remove connection from pool due to an error")

// Force underlying connection closed
idleConnection.pc.client.Close()
Expand All @@ -208,7 +208,7 @@ func (p *pool) purge() {

// If the client is not connected any more then exclude it from the pool
if !idleConnection.pc.client.IsConnected() {
p.logger.Info().Msg("Dismiss connection which is not connected")
p.logger.Info().Msg("Remove connection from pool which is not connected")
continue
}

Expand All @@ -219,7 +219,7 @@ func (p *pool) purge() {
// not expired -> keep it in the idle connection list
idleConnectionsAfterPurge = append(idleConnectionsAfterPurge, idleConnection)
} else {
p.logger.Info().Time("deadline", deadline).Msg("Dismiss connection which is expired")
p.logger.Info().Time("deadline", deadline).Msg("Remove connection from pool which is expired")

// expired -> don't add it to the idle connection list
// Force underlying connection closed
Expand Down

0 comments on commit 2162508

Please sign in to comment.