DU03 to be handed in before the 4th exercise
Logging
Logging
Use the project (game) from last semester and add the Log4j2 library. You need to edit pom.xml and module-info.java. Don't forget to add the log4j2.xml configuration file.
Configure logging to the console and to the file.
In the code, add logging messages in at least two different levels. Typical uses are:
- for catch blocks, add messages at the error, warning or fatal level and pass the exception itself as the last parameter of the logging method to make the stacktrace visible in the log. The warning level is used if an exception has occurred but the code can resolve or bypass it.
- The info or debug level is used to record that an action or piece of code that is important has been executed.
- The trace or debug level is used to provide detailed information about the progress of the program and any variable values. But be careful, you probably shouldn't include information such as login name and password in the log.
Method of submission
Submit the homework solution to the Kelvin system as the "Java 2 - Homework 1 - Maven" assignment. Upload the entire contents of the src folder and the pom.xml (and run script) file to the system. Follow the attached video below.
The project will then be compiled and Unit Tests will be performed. Due to the nature of the project and the provisional testing use of the Kelvin system in the Java 2 course, do not despair in case of failure.
This is an auxiliary test, everything will still be evaluated manually. It is important to upload the files so that everything can be evaluated and analyzed for plagiarism. I believe this is a formality and all of you are creating your own code.