Bharat,

Have you tried %c or %C, you should at least get correct category or class
name.

Even if you use the static class, you should get the category name if you
use %c and pass the name of the category (my earlier example) to the logging
class.

Please also read the taglib description in message sent across by James C.
The solution I am suggesting needs to be further packaged so that JSp does
not become cluttered with logging code.

Thanks

-----Original Message-----
From: Bharat Reddy [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 12:54 PM
To: 'LOG4J Users Mailing List'
Subject: RE: Log4J in JSP??


hi seemantini,
    I've created a class with static methods which log to log4j. but, if i
do this instead of instantiating the Category and logging the message
whereever i need to, i don't get the class name where the debugging
statement is written. The out put shows a ? mark instead of the class name.
The conversion pattern has %F in it. Why does this happen?? is there any
solution??
Bharat

-----Original Message-----
From: Seemantini Godbole [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 11:27 AM
To: 'LOG4J Users Mailing List'
Subject: RE: Log4J in JSP??


Sumit,
 
You may want to design a class with all static methods which will do logging
to log4j. It could have a method such as....
 
public static void doInfoLog(String catName, String message)
{
    Category cat = Category.getInstance(catName);
 
    //log the message to this category
}
 
You could use this class and method in your JSP.
 
 
Thanks,
seemantini
 

-----Original Message-----
From: Sumit Mishra [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 10:09 AM
To: '[EMAIL PROTECTED]'
Subject: Log4J in JSP??



Hi guys,

 

This is my first message to this list..

I just wanted to figure out whether I could use log4j in JSPs for logging
purpose?

I have already used log4j in Java class and EJBs.

Thanx in anticipation 

 

Sumit Mishra

Everyone makes mistakes. The trick is to make them when nobody  is looking.

 



DISCLAIMER: The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and deleting it from
your computer.

Thank you.

CashTech Solutions.





============================================================================
This message is intended only for the use of the Addressee(s) and may
contain information that is PRIVILEGED and CONFIDENTIAL. If you are not
the intended recipient, dissemination, distribution or copying of this
communication is prohibited.  If you have received this
communication in error, please delete all copies of the message and the
attachment(s), if any, and  promptly notify [EMAIL PROTECTED]
Thank you.
============================================================================


---------------------------------------------------------------------
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]

Reply via email to