I want to use logging in my assignment. In the first place because I'm used to write logging. Its good practise (rather then using std out's) and its a lot better for tracing problems. Normally I use commons logging as api and as implementation log4j. But I know that jdk 1.4 has its own logging api.
So I think it would be 'safer' to use the jdk api...
First because the assignment says
you should not creat things that are allready offered by the JDK. And second, because it mentions somehwhere that no additional libraries are necesairy and tirth, that you should write all the code yourself. So I think that are enough reasons to use the jdk logging.
Now, I noticed that it works a bit different then log4j. For intance, the configuration file (logger properties) is stored in: "%java_home%\jre\lib" .
But, I want to add different loggers per package, and I also want to control them on a package base. So I can put the log from RMI server to error and the log for the database to debug.
I tried to place the configuration file in my classpath, but it still uses the one in the jdk directory...
Then, I found out somewhere that you can change the configuration file by setting a jvm property... Is this a good idea ? Is it allowed to do this , and also , is it allowed to ship the property file in my project ? (in the root for example) ? ..