From your post it is hard to tell what level of detail to use, but for general help, the
log4j short manual should help. For much more detailed help, I highly recommend the
The complete log4j Manual available in pdf ($).
log4j uses a root logger. So, you can configure that to log at or above a certain level. Then if you use the package hierarchy to set up your Loggers you can configure the level for whatever part of the package hierarchy you are interested in; e.g., setting up Loggers like like one of these that uses the class name is using the package hierarchy:
Configure the Root Logger level and appenders A1, A2:
log4j.rootLogger=WARN,A1,A2
Say you want a certail level of logging from org.apache classes in use:
log4j.logger.org.apache=INFO,A3
log4j.additivity.org.apache=false
Another level of logging from com.foo classes.
log4j.logger.com.foo=DEBUG,A1
log4j.additivity.com.foo=false
Not showing configuration of the three appenders mentioned, A1, A2, A3. You may want to log to the same or different log files. You can also set a Threshold on an appender.
Additivity can be turned on or off depending on your needs.
Need more help? Post your log4j.properties file (or reasonable sized snippet from it) and indicate what you've tried and what did or didn't work.
[ March 25, 2005: Message edited by: Carol Enderlin ]