diff --git a/build.gradle b/build.gradle index a2951cc709e..1f7b9ee9803 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,7 @@ checkstyle { test { useJUnitPlatform() finalizedBy jacocoTestReport + jvmArgs('-ea') } task coverage(type: JacocoReport) { diff --git a/src/main/java/seedu/address/logic/parser/RemarkCommandParser.java b/src/main/java/seedu/address/logic/parser/RemarkCommandParser.java index 36fd0288f13..d4566b2677e 100644 --- a/src/main/java/seedu/address/logic/parser/RemarkCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/RemarkCommandParser.java @@ -4,16 +4,21 @@ import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK; +import seedu.address.commons.core.LogsCenter; import seedu.address.commons.core.index.Index; import seedu.address.logic.commands.RemarkCommand; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.person.Remark; +import java.util.logging.Logger; + /** * Parses input arguments and creates a new {@code RemarkCommand} object */ public class RemarkCommandParser implements Parser { + private static final Logger logger = LogsCenter.getLogger(RemarkCommandParser.class); + /** * Parses the given {@code String} of arguments in the context of the {@code RemarkCommand} @@ -35,8 +40,10 @@ public RemarkCommand parse(String args) throws ParseException { Remark remark = new Remark(remarkText); if (RemarkSyntaxHandler.isKeepRemark(args)) { + logger.fine("Keep remark syntax detected, remark kept accordingly"); return new RemarkCommand(index, remark, true); } + logger.fine("Keep remark syntax not detected, replace with new remark"); return new RemarkCommand(index, remark); } diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java index 1cf31c2548a..8d4920dd5e6 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/address/ui/MainWindow.java @@ -209,6 +209,7 @@ private CommandResult executeCommand(String commandText) throws CommandException } if (commandResult.isView()) { + logger.fine("View panel updating.... Viewing person at index " + logic.getLastViewedPersonIndex()); handleView(); }