فهرست منبع

Add more detailed error messages on SQL connection failure.

Fixes #1322
GJ 12 سال پیش
والد
کامیت
a345737b8b
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java

+ 3 - 2
src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java

@@ -581,14 +581,15 @@ public final class SQLDatabaseManager implements DatabaseManager {
             connection = null;
 
             if (reconnectAttempt == 0 || reconnectAttempt >= 11) {
-                mcMMO.p.getLogger().info("Connection to MySQL failed!");
+                mcMMO.p.getLogger().severe("Connection to MySQL failed!");
+                printErrors(ex);
             }
         }
         catch (ClassNotFoundException ex) {
             connection = null;
 
             if (reconnectAttempt == 0 || reconnectAttempt >= 11) {
-                mcMMO.p.getLogger().info("MySQL database driver not found!");
+                mcMMO.p.getLogger().severe("MySQL database driver not found!");
             }
         }
     }