Once again thanks :) Scott
-----Original Message----- From: Inderdeep Dhir [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 4:09 AM To: Log4J Users List Subject: RE: Calling method not showing Hi Scott, Your debug log methods in LoggerWrapper should look like this... public void debug(String categoryName, Object message) { getCategory(categoryName).log(WRAPPER_FQN,Level.DEBUG,message,null); } public void debug(String categoryName, Object message, Throwable t) { getCategory(categoryName).log(WRAPPER_FQN,Level.DEBUG,message,t); } Regards, ~ Inder -----Original Message----- From: Scott Burns [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 12:24 AM To: Log4J Users List Subject: RE: Calling method not showing Thanks this has solved most of my issues.:) I have purchased the official doc but in the meantime one of the apps still is unable to resolve the method name. The others work fine and I see no difference in my setup. Any suggestions? Thanks again for the help and quick responses. Scott 06 Jun 2003 14:44:02,288 [INFO] AutoCompleterLogger.<init> - Log4j initialized using file :/AutoCompleter_log4j.properties 06 Jun 2003 14:44:02,328 [INFO] PropertiesAutoCompleter.? - Using property file :AutoCompleter.properties public class LoggerWrapper { protected final static String WRAPPER_FQN = LoggerWrapper.class.getName(); private Logger logger=null; public LoggerWrapper(String filename){ init(filename,null); } public LoggerWrapper(String filename,String fqcname){ init(filename,fqcname); } private void init(String filename,String fqcname ) { if (fqcname==null) fqcname=WRAPPER_FQN; Properties props = null; try { props = PropertiesUtils.loadAsResource(filename); PropertyConfigurator.configure(props); logger =Logger.getLogger(fqcname); logger.log(WRAPPER_FQN,Level.INFO,"Log4j initialized using file :"+filename,null); }catch(ConfigurationException ce){ getCategory(WRAPPER_FQN).error("log4j properties file '"+ filename +"' not found. It must be in the CLASSPATH"); System.out.println("log4j properties file '"+ filename +"' not found. It must be in the CLASSPATH"); } } public void debug(String categoryName, Object message) { getCategory(categoryName).log(categoryName,Level.DEBUG,message,null); } public void debug(String categoryName, Object message, Throwable t) { getCategory(categoryName).log(categoryName,Level.DEBUG,message,t); } Props from application log4j.category.com.blccpl.autocompleter=DEBUG,RR log4j.appender.RR=org.apache.log4j.RollingFileAppender log4j.appender.RR.File=d:/auto.log log4j.appender.RR.layout=org.apache.log4j.PatternLayout log4j.appender.RR.layout.ConversionPattern=%d{DATE} [%p] %c{1}.%M - %m%n log4j.appender.RR.MaxFileSize=5000KB log4j.appender.RR.MaxBackupIndex=30 Props from wrapper log4j.category.com.blccpl.connection=DEBUG, IC1 log4j.category.com.blccpl.log=DEBUG, IC1 log4j.category.com.blccpl.util=DEBUG, IC1 log4j.appender.IC1=org.apache.log4j.RollingFileAppender log4j.appender.IC1.File=d:/NewLog.log log4j.appender.IC1.layout=org.apache.log4j.PatternLayout log4j.appender.IC1.layout.ConversionPattern=%d{DATE} [%p] %c{1}.%M - %m%n log4j.appender.IC1.MaxFileSize=5000KB log4j.appender.IC1.MaxBackupIndex=30 -----Original Message----- From: Inderdeep Dhir [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 12:58 PM To: Log4J Users List Subject: RE: Calling method not showing Hi Scott, This has been covered in the list before. You can find more details at http://marc.theaimsgroup.com/?l=log4j-user&m=105360839727846&w=2 Regards, ~ Inder -----Original Message----- From: Scott Burns [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 10:17 PM To: Log4J Users List Subject: RE: Calling method not showing Ceki, thanks for the advise. So I updated the wrapper to use Logger and am now using log4j-1.2.8.jar. I still get the same output? I probably did not fully understand your recommendation what did I miss. thanks Scott protected org.apache.log4j.Category getCategory(String categoryName) { return org.apache.log4j.Logger.getInstance(categoryName); } 05 Jun 2003 11:40:59,527 [DEBUG] requestHandler.debug - [PID :13082] SEECHook requestHandler completed request ... -----Original Message----- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 8:52 AM To: Log4J Users List Subject: Re: Calling method not showing Scott, In you wrapper, you call use the generic Category.log( <http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html>String callerFQCN, <../../../org/apache/log4j/Priority.htm>Priority level, <http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html>Object message, <http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Throwable.html>Throwable t) method. At 08:19 AM 6/5/2003 -0400, you wrote: >I inhertied a project that is using log4j. A framework was added that >wraps log4j and now the method is no longer visible in the output. I >get back the log4j wrapper method. How can I get back the calling >method? > >Scott -- Ceki For log4j documentation consider "The complete log4j manual" ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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]