RE: AsyncAppender Issue

2007-04-11 Thread Luedecke, Michael J
I believe I have determined the cause of the behavior I was experiencing
with the AsyncAppender.  It was a combination of things:

1.  I was "re-using" an instance-level object I was trying to log.  It
appears I was overwriting the properties of the object before the
AsyncAppender had a chance to pass the log onto the attached appender.
This was resolved by making sure I was sending a new local-level object
reference in each log method call.

2.  My application was stopping before the AsyncAppender had a chance to
log the last logs.  I now close the AsyncAppender before the application
closes, which forces the last logs to complete before the application
completely closes.

Thanks. 

-Original Message-
From: Curt Arnold [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 3:58 PM
To: Log4J Users List
Subject: Re: AsyncAppender Issue


>
> Has anyone else experienced this type of behavior with the 
> AsyncAppender?
>
> Thanks.
>
>

Nope.  You should pack up your test case and file a bug report to see if
we can figure out what is going on.  If you can identify the problem and
propose a patch even better.

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


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



Re: AsyncAppender Issue

2007-04-10 Thread Curt Arnold


On Apr 10, 2007, at 4:01 PM, Kamal Ahmed wrote:


Maybe , Async Appender can be re written using
java.util.concurrent.LinkedBlockingQueue

Just a suggestion

-Kamal.



LinkedBlockingQueue was introduced in JDK 1.5.  log4j 1.2 must run on  
older JVM's and alternative JVM's that do not support JDK 1.5 features.


Anyway, it would be good to have the test case and diagnose the  
problem before rewriting anything.


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



RE: AsyncAppender Issue

2007-04-10 Thread Kamal Ahmed
Maybe , Async Appender can be re written using
java.util.concurrent.LinkedBlockingQueue

Just a suggestion

-Kamal.

-Original Message-
From: Curt Arnold [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 4:58 PM
To: Log4J Users List
Subject: Re: AsyncAppender Issue


>
> Has anyone else experienced this type of behavior with the
> AsyncAppender?
>
> Thanks.
>
>

Nope.  You should pack up your test case and file a bug report to see  
if we can figure out what is going on.  If you can identify the  
problem and propose a patch even better.

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

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



Re: AsyncAppender Issue

2007-04-10 Thread Curt Arnold




Has anyone else experienced this type of behavior with the
AsyncAppender?

Thanks.




Nope.  You should pack up your test case and file a bug report to see  
if we can figure out what is going on.  If you can identify the  
problem and propose a patch even better.


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



RE: AsyncAppender Issue

2007-04-10 Thread Luedecke, Michael J
Here is the AsyncAppender configuration in my log4j.xml file:



  
  

 

I've tried setting buffer to "false" and "true".  I'm only creating
three logs in my test case, so I was thinking this may not be a full
buffer problem.

Thanks.

-Original Message-
From: James Stauffer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 2:36 PM
To: Log4J Users List
Subject: Re: AsyncAppender Issue

How are you configuring AsyncAppender.  I think it has an option that
throws away logs when the buffer is full.

On 4/10/07, Luedecke, Michael J <[EMAIL PROTECTED]> wrote:
> I'm losing logs when I use the AsyncAppender for some reason.  This 
> loss of logs occurs whether I'm using a custom appender or 
> out-of-the-box appender (i.e. FileAppender).
>
> I have not noticed this problem when I send a string in the log method

> call.  It only seems to happen when I pass an object in the log method

> call.  The object I'm sending in the log is not large or complex.  It 
> is a HashMap collection containing only 5 or 6 entries.
>
> The logs that get created successfully varies.  Sometimes I get all of

> the logs I'm expecting, but, most of the time I don't.  If I use the 
> appenders without the AsyncAppender I'm consistently getting all of 
> the expected logs.
>
> I'm not creating a large number of logs (my test case only creates 3 
> logs).  Nevertheless, I have tried to change all of the options used 
> by the AsyncAppender just in case, but it has not resolved anything.
>
> Other characteristics of my environment:
> * Using log4j 1.2.14
> * Using JDK 1.4.2_14
> * OS is Windows XP
>
> Has anyone else experienced this type of behavior with the 
> AsyncAppender?
>
> Thanks.
>
>
>


-- 
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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


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



Re: AsyncAppender Issue

2007-04-10 Thread James Stauffer

How are you configuring AsyncAppender.  I think it has an option that
throws away logs when the buffer is full.

On 4/10/07, Luedecke, Michael J <[EMAIL PROTECTED]> wrote:

I'm losing logs when I use the AsyncAppender for some reason.  This loss
of logs occurs whether I'm using a custom appender or out-of-the-box
appender (i.e. FileAppender).

I have not noticed this problem when I send a string in the log method
call.  It only seems to happen when I pass an object in the log method
call.  The object I'm sending in the log is not large or complex.  It is
a HashMap collection containing only 5 or 6 entries.

The logs that get created successfully varies.  Sometimes I get all of
the logs I'm expecting, but, most of the time I don't.  If I use the
appenders without the AsyncAppender I'm consistently getting all of the
expected logs.

I'm not creating a large number of logs (my test case only creates 3
logs).  Nevertheless, I have tried to change all of the options used by
the AsyncAppender just in case, but it has not resolved anything.

Other characteristics of my environment:
* Using log4j 1.2.14
* Using JDK 1.4.2_14
* OS is Windows XP

Has anyone else experienced this type of behavior with the
AsyncAppender?

Thanks.






--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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



AsyncAppender Issue

2007-04-10 Thread Luedecke, Michael J
I'm losing logs when I use the AsyncAppender for some reason.  This loss
of logs occurs whether I'm using a custom appender or out-of-the-box
appender (i.e. FileAppender).  

I have not noticed this problem when I send a string in the log method
call.  It only seems to happen when I pass an object in the log method
call.  The object I'm sending in the log is not large or complex.  It is
a HashMap collection containing only 5 or 6 entries.  

The logs that get created successfully varies.  Sometimes I get all of
the logs I'm expecting, but, most of the time I don't.  If I use the
appenders without the AsyncAppender I'm consistently getting all of the
expected logs.  

I'm not creating a large number of logs (my test case only creates 3
logs).  Nevertheless, I have tried to change all of the options used by
the AsyncAppender just in case, but it has not resolved anything.  

Other characteristics of my environment:
* Using log4j 1.2.14
* Using JDK 1.4.2_14
* OS is Windows XP

Has anyone else experienced this type of behavior with the
AsyncAppender?

Thanks.