Here's the config file I'm using. This will send some specific messages to a file and others to the console. This may help you a little bit hopefully.
This is used in a standalone aplication.
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<!-- ============================== -->
<!-- Append SQL messages to a file. -->
<!-- ============================== -->
<appender name="SQL" class="org.apache.log4j.RollingFileAppender">
<param name="Threshold" value="TRACE" />
<param name="File" value="sql-statement.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="5000KB" />
<param name="MaxBackupIndex" value="100" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<param name="Threshold" value="DEBUG" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%p] %m%n" />
</layout>
</appender>
<!-- =============================== -->
<!-- Application specific categories -->
<!-- =============================== -->
<category name="com.edusoft.crashtest.qsbi">
<priority value="DEBUG" />
<appender-ref ref="CONSOLE" />
</category>
<category name="com.edusoft.crashtest.qsbi.printer" additivity="true">
<priority value="TRACE" />
<appender-ref ref="SQL" />
</category>
<!-- Setup the Root category -->
<root>
<priority value="ERROR" />
</root>