FQCN should be the name of the wrapper class then you will get the correct
results. Look at commons-logging module. 

Thanks,
--Venkat.

-----Original Message-----
From: Bill Rebey [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25,2002 2:24 PM
To: Log4J Users List
Subject: RE: Forced logging


Thanks, Mark!

I can at least get the desired log messages to come out now, but 90% of the
purpose of using log4j is to get caller source location information (Class
name, Method name, Source line number), which this appears not to do, so it
doesn't quite work right.

Furthermore, I implemented this via a wrapper method.  Even if I DO get
source location info, won't every log statement report itself as being at
the same line # in the same source module, specifically, the sounce and line
of the wrapper?


Bill

        



-----Original Message-----
From: Mark Womack [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:57 PM
To: 'Log4J Users List'
Subject: RE: Forced logging


Instead of using forcedLog, you can use something like this:

public void status(Object message, Throwable t) {
        category.callAppenders(new LoggingEvent(FQCN, category,
Priority.INFO, message, t));
}

The above is a method we have to print "status" messages regardless of
current logging settings.  But beware this road.  People will start using it
and then you'll be stuck with it.  They are the equivalent of
System.out.println(), which is what we were trying to remove in the first
place...:-)

-Mark

-----Original Message-----
From: Bill Rebey [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 9:36 AM
To: Log4J Users List
Subject: Forced logging


I want to log certain messages regardless of the current Priority level.
How do I do this?

I thought I could use "Category.forcedLog (...)", but it's protected.

What should I use instead?

Thanks for the help!

Bill Rebey





======================= Confidentiality Statement ======================= 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
===================== End Confidentiality Statement =====================  



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





======================= Confidentiality Statement ======================= 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
===================== End Confidentiality Statement =====================  



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

Reply via email to