I have the following two packages:
com.mycorp.project.first
com.mycorp.project.second
I\'d like to configure Log4J (SLF4J) to write the logs from one pac
Try this is the example of properties file:
log4j.rootLogger=DEBUG, CONSOLE
# Each package has different appender name
log4j.logger.com.mycorp.project.first=DEBUG, FIRST
log4j.logger.com.mycorp.project.second=DEBUG, SECOND
log4j.appender.FIRST=org.apache.log4j.RollingFileAppender
log4j.appender.FIRST.File=./first.log
log4j.appender.FIRST.layout=org.apache.log4j.PatternLayout
log4j.appender.SECOND=org.apache.log4j.RollingFileAppender
log4j.appender.SECOND.File=./second.log
log4j.appender.SECOND.layout=org.apache.log4j.PatternLayout
or this for XML (only highlight important part):
...
...