Skip to content

Commit

Permalink
Adjust logger level change for consistent log output
Browse files Browse the repository at this point in the history
Some CONFIG level log messages are not shown to the users despite
setting to the appropriate log levels as the changing of log level
happens after these CONFIG logs.

Therefore, the function responsible for changing the log level is
shifted to an earlier place in the code.

This ensures that logs between the previous position and the new
location are now logged at the appropriate log level. The adjustment
results in consistent log output, improving the clarity and accuracy of
the logged information.
  • Loading branch information
Eclipse-Dominator committed Jul 28, 2023
1 parent 88d816e commit 3bf3f82
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/seedu/address/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ public void init() throws Exception {

AppParameters appParameters = AppParameters.parse(getParameters());
config = initConfig(appParameters.getConfigPath());
initLogging(config);

Check warning on line 56 in src/main/java/seedu/address/MainApp.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/seedu/address/MainApp.java#L56

Added line #L56 was not covered by tests

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);
Expand Down

0 comments on commit 3bf3f82

Please sign in to comment.