public class HelloLog4jChild extends HelloLog4j {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
logger.debug("This is debug message!");
logger.info("This is info message!");
logger.error("This is error message!");
HelloLog4jChild object = new HelloLog4jChild();
try {
object.testMethod();
} catch (Exception e) {
// TODO Auto-generated catch block
//e.printStackTrace();
logger.error("HelloLog4jException", e);
}
}
public void testMethod() throws Exception {
try {
testMethod2();
} catch (Exception e) {
// TODO Auto-generated catch block
// e.printStackTrace();
throw new ClassNotFoundException("test1 Exception", e);
}
}
public void testMethod2() throws Exception {
throw new ClassNotFoundException("test2 Exception");
}
}public class HelloLog4jChild extends HelloLog4j