From d98c0ae189070a8357d532cffc233f2485b876ce Mon Sep 17 00:00:00 2001 From: Jonathan Memoli Date: Sat, 23 Nov 2024 14:39:08 -0500 Subject: [PATCH] Add logs in main method --- MavenBack/src/main/java/ppp/ServerMain.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/MavenBack/src/main/java/ppp/ServerMain.java b/MavenBack/src/main/java/ppp/ServerMain.java index 4e56c2a..5d936e7 100644 --- a/MavenBack/src/main/java/ppp/ServerMain.java +++ b/MavenBack/src/main/java/ppp/ServerMain.java @@ -32,8 +32,7 @@ public static void main(String[] args) throws Exception { Server server = new Server(8080); WebAppContext webAppContext = new WebAppContext(); server.setHandler(webAppContext); - logger.info("Creating server..."); - logger.error("AAAAAAAAAAAHHHHHHHHHHH"); + logger.info("Web server created."); // Load static content from the resources directory. URL webAppDir = @@ -54,31 +53,26 @@ public static void main(String[] args) throws Exception { new ConfigurationBuilder(ServerConfig.class, new File("application.cfg")).build(true); // Connect to the DB - System.out.print("DB connecting...\n\t"); logger.info("DB connecting..."); WebDb.init(); - System.out.println("DB connected."); logger.info("DB connected."); // Initialize out DB caches - System.out.print("Initializing caches... "); logger.info("Initializing caches..."); CUser.init(); CGames.init(); CGlicko.init(); GlickoTwo.init(); - System.out.println("done."); + logger.info("Caches initialized."); // Initialize the services - System.out.print("Initializing services... "); logger.info("Initializing services..."); Thread serviceHandler = new ServiceHandlerThread(); serviceHandler.start(); - System.out.println("done."); + logger.info("Services initialized."); // Start the server! 🚀 server.start(); - System.out.println("Server started!"); logger.info("Server started!"); // Keep the main thread alive while the server is running.