You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by j d <jo...@yahoo.com> on 2005/01/11 15:32:01 UTC
Log4J date/time output problem
Hello,
I'm using Log4J 1.2.6 with the following
configuration:
AsyncAppender writing to
RollingFileAppender which is using PatternLayout with
conversion pattern
"%p | %d{ISO8601} | %t | %x | %c | %m%n".
My platform is JDK 1.4.2 on Linux redhat 9.0 .
Lately, when I loaded my system to check performence,
I noticed that some lines in the log file have
incosistent time values:
Sometimes, one line had a timestamp smaller then the
line before it.
I also noticed that the Thread source name for these
lines is always different (so, in the context of one
thread, there is no problem).
What can be the source of this behavior?
Thanks,
Yuval
the relevant configuratin is:
<appender name="ASYNC"
class="org.apache.log4j.AsyncAppender">
<appender-ref ref="TEMP"/>
</appender>
<appender name="TEMP"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="logs/redseaSys.log"/>
<param name="Append" value="false"/>
<param name="maxFileSize" value="10mb"/>
<param name="maxBackupIndex" value="80"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%p | %d{ISO8601} |
%t | %x | %c | %m%n"/>
</layout>
</appender>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Log4J date/time output problem
Posted by Ceki Gülcü <ce...@qos.ch>.
At 04:31 PM 1/11/2005, you wrote:
>Hi Ceki,
>I'm attaching part form the log fileas you requested.
The log4j-user list strips out attachments.
>Thanks for the brief response.
>Yuval
--
Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Log4J date/time output problem
Posted by j d <jo...@yahoo.com>.
Hi Ceki,
I'm attaching part form the log fileas you requested.
Thanks for the brief response.
Yuval
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> Yoval,
>
> One possible explanation is the order in which
> AsyncAppender wakes up
> one of threads waiting to push events on
> AsyncAppender's buffer, when
> this buffer is full.
>
>
http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()
>
> public final void notify()
>
> Wakes up a single thread that is waiting on this
> object's monitor. If
> any threads are waiting on this object, one of
> them is chosen to be
> awakened. The choice is ARBITRARY and occurs at
> the discretion of the
> implementation. A thread waits on an object's
> monitor by calling one
> of the wait methods.
>
> Assuming logs are generated at a fast face, the
> AsyncAppender's buffer
> will become full fairly quickly and frequently.
>
> If you would like me to investigate this further,
> then could you
> please provide a sample of the logs? I am only
> interested in the
> timestamps, the logger names and the thread names. A
> few dozen logs
> surrounding the unorderly behavior should suffice.
>
> At 03:32 PM 1/11/2005, you wrote:
> >Hello,
> >I'm using Log4J 1.2.6 with the following
> >configuration:
> >AsyncAppender writing to
> >RollingFileAppender which is using PatternLayout
> with
> >conversion pattern
> >"%p | %d{ISO8601} | %t | %x | %c | %m%n".
> >My platform is JDK 1.4.2 on Linux redhat 9.0 .
> >
> >Lately, when I loaded my system to check
> performence,
> >I noticed that some lines in the log file have
> >incosistent time values:
> >Sometimes, one line had a timestamp smaller then
> the
> >line before it.
> >I also noticed that the Thread source name for
> these
> >lines is always different (so, in the context of
> one
> >thread, there is no problem).
> >
> >What can be the source of this behavior?
> >
> >Thanks,
> >Yuval
>
> --
> Ceki G�lc�
>
> The complete log4j manual:
> http://www.qos.ch/log4j/
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail:
> log4j-user-help@logging.apache.org
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
Re: Log4J date/time output problem
Posted by j d <jo...@yahoo.com>.
Is it possible to control the size of AsyncAppender's
buffer?
Thanks,
Yuval E.
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> Yoval,
>
> One possible explanation is the order in which
> AsyncAppender wakes up
> one of threads waiting to push events on
> AsyncAppender's buffer, when
> this buffer is full.
>
>
http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()
>
> public final void notify()
>
> Wakes up a single thread that is waiting on this
> object's monitor. If
> any threads are waiting on this object, one of
> them is chosen to be
> awakened. The choice is ARBITRARY and occurs at
> the discretion of the
> implementation. A thread waits on an object's
> monitor by calling one
> of the wait methods.
>
> Assuming logs are generated at a fast face, the
> AsyncAppender's buffer
> will become full fairly quickly and frequently.
>
> If you would like me to investigate this further,
> then could you
> please provide a sample of the logs? I am only
> interested in the
> timestamps, the logger names and the thread names. A
> few dozen logs
> surrounding the unorderly behavior should suffice.
>
> At 03:32 PM 1/11/2005, you wrote:
> >Hello,
> >I'm using Log4J 1.2.6 with the following
> >configuration:
> >AsyncAppender writing to
> >RollingFileAppender which is using PatternLayout
> with
> >conversion pattern
> >"%p | %d{ISO8601} | %t | %x | %c | %m%n".
> >My platform is JDK 1.4.2 on Linux redhat 9.0 .
> >
> >Lately, when I loaded my system to check
> performence,
> >I noticed that some lines in the log file have
> >incosistent time values:
> >Sometimes, one line had a timestamp smaller then
> the
> >line before it.
> >I also noticed that the Thread source name for
> these
> >lines is always different (so, in the context of
> one
> >thread, there is no problem).
> >
> >What can be the source of this behavior?
> >
> >Thanks,
> >Yuval
>
> --
> Ceki G�lc�
>
> The complete log4j manual:
> http://www.qos.ch/log4j/
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail:
> log4j-user-help@logging.apache.org
>
>
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Log4J date/time output problem
Posted by Ceki Gülcü <ce...@qos.ch>.
Yoval,
One possible explanation is the order in which AsyncAppender wakes up
one of threads waiting to push events on AsyncAppender's buffer, when
this buffer is full.
http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()
public final void notify()
Wakes up a single thread that is waiting on this object's monitor. If
any threads are waiting on this object, one of them is chosen to be
awakened. The choice is ARBITRARY and occurs at the discretion of the
implementation. A thread waits on an object's monitor by calling one
of the wait methods.
Assuming logs are generated at a fast face, the AsyncAppender's buffer
will become full fairly quickly and frequently.
If you would like me to investigate this further, then could you
please provide a sample of the logs? I am only interested in the
timestamps, the logger names and the thread names. A few dozen logs
surrounding the unorderly behavior should suffice.
At 03:32 PM 1/11/2005, you wrote:
>Hello,
>I'm using Log4J 1.2.6 with the following
>configuration:
>AsyncAppender writing to
>RollingFileAppender which is using PatternLayout with
>conversion pattern
>"%p | %d{ISO8601} | %t | %x | %c | %m%n".
>My platform is JDK 1.4.2 on Linux redhat 9.0 .
>
>Lately, when I loaded my system to check performence,
>I noticed that some lines in the log file have
>incosistent time values:
>Sometimes, one line had a timestamp smaller then the
>line before it.
>I also noticed that the Thread source name for these
>lines is always different (so, in the context of one
>thread, there is no problem).
>
>What can be the source of this behavior?
>
>Thanks,
>Yuval
--
Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org