From 5d84ad63d76ba9202e6330d4c76360316e9e739e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Mosser?= Date: Mon, 1 Jan 2024 17:09:26 -0500 Subject: [PATCH] demonstrate log levels & confiuguration --- src/main/java/ca/mcscert/se2aa4/demos/tennis/Main.java | 8 ++++---- src/main/resources/log4j2.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/ca/mcscert/se2aa4/demos/tennis/Main.java b/src/main/java/ca/mcscert/se2aa4/demos/tennis/Main.java index 109768d..2e0ffb0 100644 --- a/src/main/java/ca/mcscert/se2aa4/demos/tennis/Main.java +++ b/src/main/java/ca/mcscert/se2aa4/demos/tennis/Main.java @@ -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"); } diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 90b5f21..21e682b 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -7,7 +7,7 @@ - +