Skip to content

Commit

Permalink
Refactor some more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneYiren committed Apr 8, 2019
1 parent 7da2d10 commit d3de538
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ lib/*
*.csv
config.json
src/test/data/sandbox/
fashionmatch.json
preferences.json
.DS_Store
./screenshot*.png
14 changes: 7 additions & 7 deletions src/main/java/seedu/address/MainApp.java
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ public class MainApp extends Application {

@Override
public void init() throws Exception {
logger.info("=============================[ Initializing AddressBook ]===========================");
logger.info("=============================[ Initializing Fashion Match ]===========================");
super.init();

AppParameters appParameters = AppParameters.parse(getParameters());
@@ -79,14 +79,14 @@ private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {
try {
addressBookOptional = storage.readAddressBook();
if (!addressBookOptional.isPresent()) {
logger.info("Data file not found. Will be starting with a sample AddressBook");
logger.info("Data file not found. Will be starting with a sample Fashion Match");
}
initialData = addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);
} catch (DataConversionException e) {
logger.warning("Data file not in the correct format. Will be starting with an empty AddressBook");
logger.warning("Data file not in the correct format. Will be starting with an empty Fashion Match");
initialData = new AddressBook();
} catch (IOException e) {
logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook");
logger.warning("Problem while reading from the file. Will be starting with an empty Fashion Match");
initialData = new AddressBook();
}

@@ -151,7 +151,7 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {
+ "Using default user prefs");
initializedPrefs = new UserPrefs();
} catch (IOException e) {
logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook");
logger.warning("Problem while reading from the file. Will be starting with an empty Fashion Match");
initializedPrefs = new UserPrefs();
}

@@ -167,13 +167,13 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {

@Override
public void start(Stage primaryStage) {
logger.info("Starting AddressBook " + MainApp.VERSION);
logger.info("Starting Fashion Match " + MainApp.VERSION);
ui.start(primaryStage);
}

@Override
public void stop() {
logger.info("============================ [ Stopping Address Book ] =============================");
logger.info("============================ [ Stopping Fashion Match ] =============================");
try {
storage.saveUserPrefs(model.getUserPrefs());
} catch (IOException e) {
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/commons/core/LogsCenter.java
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
public class LogsCenter {
private static final int MAX_FILE_COUNT = 5;
private static final int MAX_FILE_SIZE_IN_BYTES = (int) (Math.pow(2, 20) * 5); // 5MB
private static final String LOG_FILE = "addressbook.log";
private static final String LOG_FILE = "fashionmatch.log";
private static Level currentLogLevel = Level.INFO;
private static final Logger logger = LogsCenter.getLogger(LogsCenter.class);
private static FileHandler fileHandler;

0 comments on commit d3de538

Please sign in to comment.