I am using Struts Framework and log4j. I have log4j.configuration file in my WEB-INF classes directory. Here is what it looks like: log4j.rootCategory=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apace.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%F:%L] -%m%n Now, I am getting TONS of messages on the console. I just want to see only the messages from my classes. Can anyone help me on this. Thanks a lot !
so you dont want to see output from struts classes. Struts javadoc indicate that all Struts classes fall under package name that starts with org.apache.struts So by assuming that struts classes would have retreived the Logger instance by doing Logger log = Logger.getLogger(struts-specific-classname); adding the following entry to your log4j.configuration properties should help you get rid of statements logged with levels of DEBUG and INFO.
Am sure you are interested in seeing messages with log levels of WARN / ERROR/ FATAL etc that get logged from Struts classes. Not sure if this would work but worth trying anyways.
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad: