Problem/Instability with DOMConfigurator and several loggers

2002-08-21 Thread Arnold Dieter

I try to configure log4j (log4j-1.2.6) with an XML file and the
DOMConfigurator (application running on Tomcat 4, Windows 2000).
When I define several loggers in the file, the initialization works fine,
but I observe failures in the application (ClassCastException,
NoClassDefFoundError) which seem not ot have a direct relation with log4j.
When I am using less loggers, these problems do not occur.
Also,  when I use a normal property file (with PropertyConfigurator) for
configuration, everthing works well.

To me this seems to be a kind of instability or resources problem of log4j.
Has somebody observed similar problems?


Thanks in advance

Dieter


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Database logging and high loads

2002-08-21 Thread Buchanan, Paul

Hi all --

I have run into a somewhat odd problem with a centralized logging facility I
am testing.  The application has a servlet front end, which takes in XML
messages and passes them off to log4j, which then is logging to a database.
Under high load, around 1,500 transactions a minute, around 10% of the
requests are logged twice.  This results in the database rejecting the
request due to a duplicate key violation.  Has anyone seen this type of
thing with log4j under high load?

Thanks,

Paul Buchanan
West Group
Delivery Services 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Logger serializable?

2002-08-21 Thread Ryan Cuprak


 Just out of curiosity - are loggers serializable? In other words, can they
be safely put into jndi? I was going to setup the loggers for my EJBs in
Mbeans and put the loggers into jndi (using jboss).

-Ryan
 

--
Ryan Cuprak  Software Developer Eastman Kodak
www.cuprak.net Cell: (203)-376-8789
[EMAIL PROTECTED]Office: (203)-786-5682
[EMAIL PROTECTED]  Home: (203)-407-8267
AIM: rcupr
--


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Logger serializable?

2002-08-21 Thread Shapira, Yoav

Hi,
Much like "are my beloved Patriots going to win the SuperBowl again?",
the answer to your question is almost definitely no.  Logger is not
serializable.  You can easily and quickly tell that from the JavaDoc,
at:
http://jakarta.apache.org/log4j/docs/api/index.html

(class Logger or an ancestor would have to implement
java.io.Serializable and I don't think it does).

Your use-case is interesting.  Why did you want to put the loggers into
JNDI?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Ryan Cuprak [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 21, 2002 11:26 AM
>To: Log4J Users List
>Subject: Logger serializable?
>
>
> Just out of curiosity - are loggers serializable? In other words, can
they
>be safely put into jndi? I was going to setup the loggers for my EJBs
in
>Mbeans and put the loggers into jndi (using jboss).
>
>-Ryan
>
>
>---
---
>Ryan Cuprak  Software Developer Eastman Kodak
>www.cuprak.net Cell: (203)-376-8789
>[EMAIL PROTECTED]Office: (203)-786-5682
>[EMAIL PROTECTED]  Home: (203)-407-8267
>AIM: rcupr
>---
---
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Logger serializable?

2002-08-21 Thread Ryan Cuprak


 Thanks for the reply.
 I was going to put the loggers into jndi so that I could gain access to
them from within my EJBs. I know that Jboss does have built-in jboss support
but I am trying to keep my EJBs pure so that I would not be tied to one app
server (actually a constraint on my project). I also wanted to manage the
logging via mbeans. Right now I don't see any clear way to use log4j in
enterprise beans and easily manage the logging at run time.

-Ryan Cuprak

On 8/21/02 11:38 AM, "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:

> Hi,
> Much like "are my beloved Patriots going to win the SuperBowl again?",
> the answer to your question is almost definitely no.  Logger is not
> serializable.  You can easily and quickly tell that from the JavaDoc,
> at:
> http://jakarta.apache.org/log4j/docs/api/index.html
> 
> (class Logger or an ancestor would have to implement
> java.io.Serializable and I don't think it does).
> 
> Your use-case is interesting.  Why did you want to put the loggers into
> JNDI?
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
>> -Original Message-
>> From: Ryan Cuprak [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 21, 2002 11:26 AM
>> To: Log4J Users List
>> Subject: Logger serializable?
>> 
>> 
>> Just out of curiosity - are loggers serializable? In other words, can
> they
>> be safely put into jndi? I was going to setup the loggers for my EJBs
> in
>> Mbeans and put the loggers into jndi (using jboss).
>> 
>> -Ryan
>> 
>> 
>> ---
> ---
>> Ryan Cuprak  Software Developer Eastman Kodak
>> www.cuprak.net Cell: (203)-376-8789
>> [EMAIL PROTECTED]Office: (203)-786-5682
>> [EMAIL PROTECTED]  Home: (203)-407-8267
>> AIM: rcupr
>> ---
> ---
>> 
>> 
>> --
>> To unsubscribe, e-mail:   > [EMAIL PROTECTED]>
>> For additional commands, e-mail: > [EMAIL PROTECTED]>
> 
> 
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential, proprietary
> and/or privileged.  This e-mail is intended only for the individual(s) to whom
> it is addressed, and may not be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended recipient, please immediately
> delete this e-mail from your computer system and notify the sender.  Thank
> you.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Ryan Cuprak  Software Developer Eastman Kodak
www.cuprak.net Cell: (203)-376-8789
[EMAIL PROTECTED]Office: (203)-786-5682
[EMAIL PROTECTED]  Home: (203)-407-8267
AIM: rcupr
--


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Logger serializable?

2002-08-21 Thread Shapira, Yoav

Hi,

>but I am trying to keep my EJBs pure so that I would not be tied to one
app
>server (actually a constraint on my project). I also wanted to manage
the
>logging via mbeans. Right now I don't see any clear way to use log4j in
>enterprise beans and easily manage the logging at run time.

Here's what we do:

- Obtain loggers in the simplest way:
Logger.getLogger(Foo.class.getName());
- Use loggers normally within the beans.
- We wrote a simple servlet that lets you name a package / class and set
the logging level for it.  This servlet is really very simple and easy
to write.  Only two form fields (class name and logging level) and a
submit button for the UI.  Very simple logger =
Logger.getLogger(whatever was specified in the class name field) and
logger.setLevel(whatever was specified in the level field).  

This has worked for us for runtime changes in tomcat standalone,
JBoss-tomcat, and JBoss-Jetty, without any container problems (because
of course this approach is container-independent).  

I think the MBean is a nice solution as well, but it may be a bit harder
to implement.  We also didn't want to tie ourselves to a container that
supports JMX, because at the time we developed this JMX support wasn't
to be taken for granted ;)  

Maybe it will work for you too.  Good luck,

Yoav Shapira
Millennium ChemInformatics


This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Logger serializable?

2002-08-21 Thread Eric Jain

>  I was going to put the loggers into jndi so that I could gain access to
> them from within my EJBs. I know that Jboss does have built-in jboss
support
> but I am trying to keep my EJBs pure so that I would not be tied to one
app
> server (actually a constraint on my project).

Another possibility would be to create your own logger class with abstract
methods such as info, debug etc. Provide a static factory method
getInstance(name : String) that returns a subclass of your logger (possibly
after looking up the class name via JNDI) that works as a wrapper for a
log4j (or whatever) logger.


--
Eric Jain



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem/Instability with DOMConfigurator and several loggers

2002-08-21 Thread Mark Womack

Dieter,

I think we would need to see your configuration file and an example of the
failures you are seeing to better give you an answer.

-Mark

> -Original Message-
> From: Arnold Dieter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 7:00 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem/Instability with DOMConfigurator and several loggers
> 
> 
> I try to configure log4j (log4j-1.2.6) with an XML file and the
> DOMConfigurator (application running on Tomcat 4, Windows 2000).
> When I define several loggers in the file, the initialization 
> works fine,
> but I observe failures in the application (ClassCastException,
> NoClassDefFoundError) which seem not ot have a direct 
> relation with log4j.
> When I am using less loggers, these problems do not occur.
> Also,  when I use a normal property file (with 
> PropertyConfigurator) for
> configuration, everthing works well.
> 
> To me this seems to be a kind of instability or resources 
> problem of log4j.
> Has somebody observed similar problems?
> 
> 
> Thanks in advance
> 
> Dieter
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: FileAppender problems during load testing

2002-08-21 Thread Laura M. Ly

Do not use the same PatternLayout for different appenders.
PatternLayout has a  StringBuffer field that is only used in format().
Multiple appenders end up sharing the same buffer.

--
Sometimes an event would get written to a wrong file (in addition to, and
sometimes in place of the correct file).
I set my category based on a user session and each session creates its own
log file(for now there's only one FileAppender for the Logger):
For the most part, I logging works great. But every now and then, I get the
wrong events. . .

I only discovered this during Load Testing.  I had 32 clients running.
So then I took the Load Testing tool down to just 2 clients.

Here are some of the things I notice:
1. The majority of the events get written to the correct file.
2. Sometimes, an event would get written to its file in addition to the
other.
3. Sometimes, and event on a Logger would get written to the other file.
   Snippet from File51 (see line 2):
 2002-08-13 18:17:20.119 - SQL - File51-1 row(s) returned
 2002-08-13 18:17:20.169 - SQL - File56-1 row(s) returned
 2002-08-13 18:17:20.159 - TRACE -
 File51- Defaulting lookupDate
 2002-08-13 18:17:20.300 - SQL - File51-SELECT 

4. Most of the times when the error happens, the two clients fired a
logging event at the same time as the other.
   Snippet from File51(see line 3):
 2002-08-13 18:17:11.637 - TRACE - File51-
 Defaulting lookupDate
 2002-08-13 18:17:11.647 - SQL - File51-SELECT ...
 2002-08-13 18:17:11.727 - SQL - File56-SELECT ...
 2002-08-13 18:17:11.727 - SQL - File51-1 row(s) returned
 2002-08-13 18:17:11.757 - TRACE - File51-
 Defaulting lookupDate

5. On occassion, I'll see the timestamping not come in order
   Snippet from File51(see line 2):
 2002-08-13 18:17:28.191 - TRACE - File51- findMany:
 1 row(s) returned from QueryCache
 2002-08-13 18:17:28.301 - LOG - File56-Processing
 SRVLT_CNT=5&SID=UXUBCFYAKCXYCCCDIWQ
 2002-08-13 18:17:28.281 - TRACE - File51-
 Defaulting lookupDate


Any ideas?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




synchronization issues in log4j

2002-08-21 Thread Arun Jannela

Hi
Is there any option available in log4j . I have a requirement to log
daily and move the content to another file daily by cleaning the content
in the original file  and Delete  old files monthly.

 

Thanks,

Arun

[EMAIL PROTECTED]

-Original Message-
From: Mark Womack [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 21, 2002 10:29 PM
To: 'Log4J Users List'
Subject: RE: Problem/Instability with DOMConfigurator and several
loggers

Dieter,

I think we would need to see your configuration file and an example of
the
failures you are seeing to better give you an answer.

-Mark

> -Original Message-
> From: Arnold Dieter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 7:00 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem/Instability with DOMConfigurator and several loggers
> 
> 
> I try to configure log4j (log4j-1.2.6) with an XML file and the
> DOMConfigurator (application running on Tomcat 4, Windows 2000).
> When I define several loggers in the file, the initialization 
> works fine,
> but I observe failures in the application (ClassCastException,
> NoClassDefFoundError) which seem not ot have a direct 
> relation with log4j.
> When I am using less loggers, these problems do not occur.
> Also,  when I use a normal property file (with 
> PropertyConfigurator) for
> configuration, everthing works well.
> 
> To me this seems to be a kind of instability or resources 
> problem of log4j.
> Has somebody observed similar problems?
> 
> 
> Thanks in advance
> 
> Dieter
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:




**Disclaimer


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.


*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Logging Stress test

2002-08-21 Thread Arun Jannela


Hi,
I Need to stress test Logging component [Search process itself].
I want to Use JMeter from apache for this. How can I load test this
component with and without log4j component.

Regards,
arun



**Disclaimer


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.


*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Log4J performance measuring

2002-08-21 Thread Arun Jannela



How Log4J affects the performance? How to Test the component with and
without logging. How can I Collect the metrics?

Regards,
Arun



**Disclaimer


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.


*



--
To unsubscribe, e-mail:   
For additional commands, e-mail: