From 2d172b9ffe3334bddde53af6ec8310feb9c9181d Mon Sep 17 00:00:00 2001 From: lzq Date: Sat, 29 Jul 2023 21:54:19 +0800 Subject: [PATCH] Adjust log initialization position in MainApp In the MainApp class, let's move the call to the initLogging method closer to the start of the execution start point, to minimize the possibility of log statements being executed before the desired log level is set. --- src/main/java/seedu/address/MainApp.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java index ff6cee38..b6e70ab8 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/address/MainApp.java @@ -53,14 +53,13 @@ public void init() throws Exception { AppParameters appParameters = AppParameters.parse(getParameters()); config = initConfig(appParameters.getConfigPath()); + initLogging(config); UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath()); UserPrefs userPrefs = initPrefs(userPrefsStorage); AddressBookStorage addressBookStorage = new JsonAddressBookStorage(userPrefs.getAddressBookFilePath()); storage = new StorageManager(addressBookStorage, userPrefsStorage); - initLogging(config); - model = initModelManager(storage, userPrefs); logic = new LogicManager(model, storage);