Put project modules under pkg directory
This commit is contained in:
parent
f4684be37d
commit
e1516e450b
13 changed files with 7 additions and 7 deletions
|
|
@ -1,15 +0,0 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func LogPoolState(pool *pgxpool.Pool, message string) {
|
||||
stat := pool.Stat()
|
||||
log.Info().
|
||||
Int32("acquired_conns", stat.AcquiredConns()).
|
||||
Int32("idle_conns", stat.IdleConns()).
|
||||
Int32("total_conns", stat.TotalConns()).
|
||||
Msg(message)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue