Skip to content

Commit

Permalink
wasdwasdwasdwasdwasd
Browse files Browse the repository at this point in the history
  • Loading branch information
GodCipher committed Sep 25, 2023
1 parent 959829d commit 9d066bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,9 @@ public class Application {

@EventListener(ApplicationReadyEvent.class)
public void connectToDatabase() {
shootFormattedDebugMessage(1, 2, 3, 4);
gameDao.initializeDatabase();
}

private void shootFormattedDebugMessage(int duplicated, int success, int error, int notFound) {

Webservice.REST_LOGGER.info(success + " game(s) has been saved to the database.");

if (notFound > 0) {
Webservice.REST_LOGGER.warning("> | " + notFound + " game(s) were not inserted");
}

if (error > 0) {
Webservice.REST_LOGGER.warning("> | " + error + " game(s) had errors");
}

if (duplicated > 0) {
Webservice.REST_LOGGER.warning("> | " + duplicated + " game(s) are duplicates");
}
}

@EventListener(ApplicationStartedEvent.class)
public void startApplication() {
Webservice.REST_LOGGER.info("Booting up application...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,18 @@ private void timing(Runnable runnable, String message) {

private void shootFormattedDebugMessage(int duplicated, int success, int error, int notFound) {

Webservice.REST_LOGGER.info("_".repeat(50));
Webservice.REST_LOGGER.info(success + " games has been saved to the database.");
Webservice.REST_LOGGER.info(success + " game(s) has been saved to the database.");

if (notFound > 0) {
Webservice.REST_LOGGER.warning(" | " + notFound + " games were not inserted");
Webservice.REST_LOGGER.warning("> | " + notFound + " game(s) were not inserted");
}

if (error > 0) {
Webservice.REST_LOGGER.warning(" | " + error + " games had errors");
Webservice.REST_LOGGER.warning("> | " + error + " game(s) had errors");
}

if (duplicated > 0) {
Webservice.REST_LOGGER.warning(" | " + duplicated + " games are duplicates");
Webservice.REST_LOGGER.warning("> | " + duplicated + " game(s) are duplicates");
}

Webservice.REST_LOGGER.info("_".repeat(100));
}
}

0 comments on commit 9d066bc

Please sign in to comment.