Okay, sounds good.  Is "locationInfo" a field in log4j somewhere?  The
JDBCAppender extends the AppenderSkeleton class, which doesn't seem to have
a locationInfo method.  I can add the field, but how does log4j pick that
up?  Is the JMX smart enough to do that?

Thanks,
Steve



                                                                                       
                                          
                      "Klein, Scott @                                                  
                                          
                      TW" <scott.klein         To:       'Log4J Users List' 
<[EMAIL PROTECTED]>                      
                                               cc:                                     
                                          
                      06/12/2002 10:37         Subject:  RE: getClassName from 
locationInfo object                               
                      AM                                                               
                                          
                      Please respond to                                                
                                          
                      "Log4J Users                                                     
                                          
                      List"                                                            
                                          
                                                                                       
                                          
                                                                                       
                                          




The recommendation to not us %C is purely a speed issue as far as I know. I
also had a similar problem, and here is what fixed it:

log4j.appender.<APPENDER_NAME>.locationInfo=true

where <APPENDER_NAME> is, well, the name of the appender ;)

enjoy.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 5:19 AM
To: Log4J Users List
Subject: RE: getClassName from locationInfo object



Well, I'm extending the JDBCAppender to use its own thread, and to use a
prepared statement, so I have my own columns for classname, etc.  I'm using
(in development)  Win 2000 and WebLogic 6.1.  I'm going to try to put some
log4j calls in actual classes (not JSPs) and see if it can pick it up.

Why is it not recommended to use %C in the pattern?  Does it slow things
down too much?

Thanks!
Steve





                      "RUTHERFURD,

                      Michael"                 To:       Log4J Users List
<[EMAIL PROTECTED]>
                      <mrutherfurd@west        cc:

                      pac.com.au>              Subject:  RE: getClassName
from locationInfo object


                      06/11/2002 09:49

                      PM

                      Please respond to

                      "Log4J Users

                      List"









The ? probably means that LocationInfo couldn't parse the Throwable's stack
trace that is used to determine class name, method name, line number etc.
What OS are you using, as I had this problem in Websphere on AS400? I ended
up having to write a kludged version of LocationInfo to parse the weird
stack trace.

Anyway its not recommended that you use %C in the pattern. Maybe you can
can
use %c if the category name is the same as the class.

Michael Rutherfurd

> I'm using log4j within my JSPs, and I'd like to log the class name, etc
in
> my message, but all I get for the class name is ?.  Is this some
limitations on JSPs, > or is there something I'm missing?  I looked through
> the archive to see if there was anything similar, but I didn't find
> anything.

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



--

 NOTICE:  This e-mail message and all attachments transmitted with it may
 contain legally privileged and confidential information intended solely
 for the use of the addressee.  If the reader of this message is not the
 intended recipient, you are hereby notified that any reading,
 dissemination, distribution, copying, or other use of this message or
 its attachments, hyperlinks, or any other files of any kind is strictly
 prohibited.  If you have received this message in error, please notify
 the sender immediately by telephone (865-218-2000) or by a reply to this
 electronic mail message and delete this message and all copies and
 backups thereof.





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

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



--
                                                                          
 NOTICE:  This e-mail message and all attachments transmitted with it may 
 contain legally privileged and confidential information intended solely  
 for the use of the addressee.  If the reader of this message is not the  
 intended recipient, you are hereby notified that any reading,            
 dissemination, distribution, copying, or other use of this message or    
 its attachments, hyperlinks, or any other files of any kind is strictly  
 prohibited.  If you have received this message in error, please notify   
 the sender immediately by telephone (865-218-2000) or by a reply to this 
 electronic mail message and delete this message and all copies and       
 backups thereof.                                                         
                                                                          



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

Reply via email to