This homework makes sure you have log4j properly setup, and tests a sample log4j.properties configuration.
You must submit this homework to your SVN repository using Eclipse. Your homework, including the src directory and all required source code files must be at the following location:
https://www.cs.usfca.edu/svn/<username>/cs212/homework06/
where <username> is your CS username in all lowercase letters. Failure to properly submit your homework will result in a point deduction.
You must submit this programming homework by 11:59pm on Friday, March 22, 2013.
You must download and install the log4j package, as well as add it to your project build path. Then, create a log4j.properties file in your src directory such that the console output looks like:
Donkey
Elephant
Ferret
And your debug.log file output looks like:
Level: TRACE, Method: Log4jConfigDemo.main(), Line 8, Thread: main, Message: Aardvark
Level: DEBUG, Method: Log4jConfigDemo.main(), Line 9, Thread: main, Message: Buffalo
Level: INFO , Method: Log4jConfigDemo.main(), Line 10, Thread: main, Message: Chameleon
Level: WARN , Method: Log4jConfigDemo.main(), Line 11, Thread: main, Message: Donkey
Level: ERROR, Method: Log4jConfigDemo.main(), Line 12, Thread: main, Message: Elephant
Level: FATAL, Method: Log4jConfigDemo.main(), Line 13, Thread: main, Message: Ferret
Note that you should include a timestamp in your log files (this made unit testing more difficult for this homework assignment, so a timestamp is not included).
Use the provided unit tests to test your code. Keep in mind it will also be reviewed for proper exception handling and input validation.