static
void test() {
int i = -1;
NDC.push("NDC");
Category root = Category.getRoot();
cat.debug("Message " + ++i);
root.debug("Message " + i);
cat.info ("Message " + ++i);
root.info("Message " + i);
cat.warn ("Message " + ++i);
root.warn("Message " + i);
cat.error("Message " + ++i);
root.error("Message " + i);
cat.log(Priority.FATAL, "Message " + ++i);
root.log(Priority.FATAL, "Message " + i);
Exception e = new Exception("Just testing");
cat.debug("Message " + ++i, e);
root.debug("Message " + i, e);
cat.info("Message " + ++i, e);
root.info("Message " + i, e);
cat.warn("Message " + ++i , e);
root.warn("Message " + i , e);
cat.error("Message " + ++i, e);
root.error("Message " + i, e);
cat.log(Priority.FATAL, "Message " + ++i, e);
root.log(Priority.FATAL, "Message " + i, e);
// It is always a good idea to call this method when exiting an
// application.
Category.shutdown();