Skip to content

Commit 467f48d

Browse files
committed
Added query logger
1 parent 05ea936 commit 467f48d

File tree

1 file changed

+2
-0
lines changed
  • src/main/java/org/javawebstack/orm/connection/pool

1 file changed

+2
-0
lines changed

src/main/java/org/javawebstack/orm/connection/pool/SQLPool.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class SQLPool {
1515
private final Queue<SQL> connectionQueue = new LinkedBlockingQueue<>();
1616
private final Set<QueryLogger> loggers = new HashSet<>();
1717
private boolean closing;
18+
private PoolQueryLogger queryLogger = new PoolQueryLogger();
1819

1920
public SQLPool(PoolScaling scaling, Supplier<SQL> supplier) {
2021
this.scaling = scaling;
@@ -64,6 +65,7 @@ public void scale() {
6465
return;
6566
while (newScale > connections.size()) {
6667
SQL sql = supplier.get();
68+
sql.addQueryLogger(queryLogger);
6769
connections.add(sql);
6870
connectionQueue.add(sql);
6971
}

0 commit comments

Comments
 (0)