Skip to content

Commit

Permalink
demonstrate log levels & confiuguration
Browse files Browse the repository at this point in the history
  • Loading branch information
mosser committed Jan 1, 2024
1 parent 5573f1d commit 5d84ad6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/ca/mcscert/se2aa4/demos/tennis/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public static void main(String[] args) {
try {
CommandLine cmd = parser.parse(options, args);
PLAYER1_STRENGTH = Integer.parseInt(cmd.getOptionValue("p1","50"));
logger.info("****** P1's Strength is " + PLAYER1_STRENGTH+"/100");
logger.trace("****** P1's Strength is " + PLAYER1_STRENGTH+"/100");
PLAYER2_STRENGTH = Integer.parseInt(cmd.getOptionValue("p2","50"));
logger.info("****** P2's Strength is " + PLAYER2_STRENGTH+"/100");
logger.trace("****** P2's Strength is " + PLAYER2_STRENGTH+"/100");
} catch (ParseException pe) {
logger.info("An error has occurred");
logger.error("An error has occurred");
}
logger.info("**** Starting game");
logger.info("** TODO...");
logger.debug("** TODO...");
logger.info("** Closing Tennis Counter Assistant");
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</Appenders>

<Loggers>
<Root level="trace">
<Root level="info">
<AppenderRef ref="console" />
</Root>
</Loggers>
Expand Down

0 comments on commit 5d84ad6

Please sign in to comment.