I am using log4j in a project where the web server is Tomcat. After the project is executed, the log file contains many DEBUG information apart from those that I have logged. How to prevent such junk debug messages from being logged into my log file.
Read about category.priority and logger.level parameters from log4j configuration file. Changing them will help You to prevent unwanted data to be logged. Also in logger tag, You can filter data to be logged only from Your packages.
That really was a useful link. Thanks a lot. But my problem is this: I am aware of the priority levels. I have given the level for the appender as DEBUG. This means any message logged with any of DEBUG, INFO, WARN, ERROR, FATAL levels will go into this log file. But the problem here is that the log file contains certain DEBUG level messages that I havent logged anywhere in my application. I guess they are server logs coming into my log file. How can I filter them ?