Problem in using log4j 1.3
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajeev_Shrivastava
Posted On:   Wednesday, November 2, 2005 04:10 PM

HI, I am getting some problem in using log4j 1.3. I am using Ulogger and want to create a log in XML format. I am getting only log4j related debug statement in my log . I have follwing log4j.xml ------------------------------- <?xml version="1.0" encoding="UTF-8" ?> ------------------------------ Here is my code: ------------------------- package com.logger.mylogger; import org.apache.log4j.ULogger; import org.apache.ugli.LoggerFactoryAdapter; import org.apache.ugli.ULogger; impor ugli.LoggerFactory; import org.apache.ugli.impl.Log4jLoggerFA; import javax   More>>

HI,

I am getting some problem in using log4j 1.3. I am using Ulogger and want to create a log in XML format. I am getting only log4j related debug statement in my log . I have follwing log4j.xml
-------------------------------
<?xml version="1.0" encoding="UTF-8" ?>

















------------------------------


Here is my code:
-------------------------
package com.logger.mylogger;
import org.apache.log4j.ULogger;
import org.apache.ugli.LoggerFactoryAdapter;
import org.apache.ugli.ULogger;
impor ugli.LoggerFactory;
import org.apache.ugli.impl.Log4jLoggerFA;

import javax.xml.parsers.SAXParser;
import org.apache.log4j.joran.JoranConfigurator;
//import org.apache.log4j.xml.DOMConfigurator;


/* @author rajeevsh
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class MyLoggerXMLTest {
public static ULogger ulogger = LoggerFactory.getLogger("com.logger.mylogger.MyLoggerXMLTest");

public static void main(String[] args) {
String configFile = args[0];

LogSetup.logerSetup(configFile);
//BasicConfigurator.configure();
//PropertyConfigurator.configure(args[0]);

//org.apache.log4j.rolling.RollingFileAppender ss = new

ulogger.info("This is my message");
ulogger.debug("This is my message");
ulogger.warn("This is my messgs");
ulogger.error("This is my messgs");

Object obj = ulogger.getClass();
boolean debigflag = ulogger.isDebugEnabled();
boolean errflag = ulogger.isErrorEnabled();
boolean infoflag = ulogger.isInfoEnabled();
boolean warnflag = ulogger.isWarnEnabled();
ulogger.error("This is your messgs");


}
}
----------------

Please help

Thanks    <<Less

Re: Problem in using log4j 1.3

Posted By:   Anonymous  
Posted On:   Thursday, November 3, 2005 06:20 AM

I dont think someone would read such unformatted code...
About | Sitemap | Contact