I am using jsp/ servlets and JNI code in my application.
For logging traces of jsp and servlet code i am using log4j package.

But for JNI code i am using simple print statement and the output comes in catalina.out. The size of catalina.out is increasing very fast and i am not able to rotate it.

I found a property "swallowOutput" for logging the traces in other files.
What i read on many documents is that, by using swallowOutput i can redirect my system.out and system.err statements to some specified file.

i made the following changes in my server.xml:::

<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Context path="" docBase="/home2/R1P4_1+0/run_base/ssgui" debug="0" reloadable="false" crossContext="true" swallowOutput="true" />

<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_deepti" suffix=".txt" timestamp="true"/>

</Host>

My questions::
1) swallowOutput works for JNI code also? because in JNI code we dont write system.out or system.err
2) if yes, is there any error in the above configuration???