Hello,

I'm having problems when using an AsyncAppender, it doesn't seem to wait
for the buffer to be full, but writes the logs one by one.
My program writes one line of log each second, and I can see how they
are written to the output file one by one.
My xml configuration file seems like this:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration>
 <appender name="asTrazaGsh" class="org.apache.log4j.AsyncAppender">
   <param name="BufferSize" value="10" />
   <appender-ref ref="trazaGsh" />
 </appender>

 <appender name="trazaGsh" class="org.apache.log4j.RollingFileAppender">

           <param name="File" value="${ruta.logs}gshxml.log" />
           <param name="MaxFileSize" value="1024KB" />
           <param name="MaxBackupIndex" value="5" />
           <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
      value="%d %p %t %c - %m%n"/>
           </layout>
 </appender>

 <category name="GSH">
   <priority value="DEBUG" />
   <appender-ref ref="trazaGsh"/>
 </category>

 <category name="ASGSH">
   <priority value="DEBUG" />
   <appender-ref ref="asTrazaGsh"/>
 </category>

</log4j:configuration>

I log to the ASGSH category.
Is the BufferSize param set up in the right way? I have also tried
without that param, but the result is the same.
Any help really appreciated.
    JL


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to