Showing posts with label Log4j. Show all posts
Showing posts with label Log4j. Show all posts

Tuesday, July 22, 2008

Some experience with Log4j

I was doing some basic practice programs which implements Log4j for logging. I was getting following warning message on the console. Here I was using PropertyConfigurator to configure Log4j using the log4j.properties file.



I found the description about the above warning on many of the technical forums which gave a reason that this warning occurs when the log4j.properties file has not been found by the program in the specified path.

But if that was the case, I purposely tried giving wrong file path to the same program, and whoa I got the following exception:



Later I found that there was a small spelling mistake in my log4j.properties file, due to which it was failing to initialize the log4j system. So, when I corrected that mistake & tried to run the program, I got the expected output :)


_________________________________________________________________________________________________________________

"Look at the sky. We are not alone. The whole Universe is friendly to us and conspires only to give the best to those who dream and work."

- Dr. A P J Abdul Kalam
_________________________________________________________________________________________________________________