Skip to content

Commit

Permalink
Tweak database connection confirmation messages
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Jul 28, 2023
1 parent 6209536 commit bd83c89
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ public void onEnable() {

// Prepare database connection
this.database = new MySqlDatabase(this);
log(Level.INFO, "Attempting to establish connection to the " + settings.getDatabaseType().getDisplayName() + " database...");
log(Level.INFO, String.format("Attempting to establish connection to the %s database...",
settings.getDatabaseType().getDisplayName()));
this.database.initialize();
if (initialized.get()) {
log(Level.INFO, "Successfully established a connection to the database");
log(Level.INFO, String.format("Successfully established a connection to the %s database",
settings.getDatabaseType().getDisplayName()));
} else {
throw new HuskSyncInitializationException("Failed to establish a connection to the database. " +
"Please check the supplied database credentials in the config file");
Expand Down

0 comments on commit bd83c89

Please sign in to comment.