mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-02 06:28:13 +01:00
Removed performance hit of logging
Since Java 8, we can use Supplier for logger, which will be evaluated lazily. In general, the debug stuff should be removed when we have more stability.
This commit is contained in:
parent
29d09922b9
commit
1d5086531d
@ -911,8 +911,9 @@ public class MySQLDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
|
||||
preparedStatement2.setString(1, uniqueId);
|
||||
preparedStatement2.addBatch();
|
||||
// Execute
|
||||
if (DEBUG)
|
||||
plugin.getLogger().info("DEBUG: " + preparedStatement2.toString());
|
||||
if (DEBUG) {
|
||||
plugin.getLogger().info(() -> "DEBUG: " + preparedStatement2.toString()); // Evaluated lazily
|
||||
}
|
||||
preparedStatement2.executeBatch();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user