Custom name to pool

This commit is contained in:
Xephi59 2015-07-31 14:22:07 +02:00
parent 6b53afa731
commit 8b9f0ec882
2 changed files with 7 additions and 4 deletions

View File

@ -166,10 +166,11 @@ public class AuthMe extends JavaPlugin {
// Set Console Filter
if (Settings.removePassword) {
this.getLogger().setFilter(new ConsoleFilter());
Bukkit.getLogger().setFilter(new ConsoleFilter());
Logger.getLogger("Minecraft").setFilter(new ConsoleFilter());
authmeLogger.setFilter(new ConsoleFilter());
ConsoleFilter filter = new ConsoleFilter();
this.getLogger().setFilter(filter);
Bukkit.getLogger().setFilter(filter);
Logger.getLogger("Minecraft").setFilter(filter);
authmeLogger.setFilter(filter);
// Set Log4J Filter
try {
Class.forName("org.apache.logging.log4j.core.Filter");

View File

@ -105,6 +105,7 @@ public class MySQL implements DataSource {
config.setJdbcUrl("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database);
config.setUsername(this.username);
config.setPassword(this.password);
config.setPoolName("AuthMeMYSQLPool");
config.addDataSourceProperty("cachePrepStmts", "true");
config.addDataSourceProperty("prepStmtCacheSize", "250");
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
@ -900,6 +901,7 @@ public class MySQL implements DataSource {
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
config.addDataSourceProperty("autoReconnect", true);
config.addDataSourceProperty("initializationFailFast", true);
config.setPoolName("AuthMeMYSQLPool");
ds = new HikariDataSource(config);
if (!reload)
ConsoleLogger.info("ConnectionPool was unavailable... Reconnected!");