Package org.apache.log4j

Examples of org.apache.log4j.Category.info()


        ve.setProperty("runtime.log.logsystem.log4j.category", CATEGORY_NAME);

        ve.init();

        log.info("this should follow the initialization output from velocity");
    }
}
View Full Code Here


   
    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);
View Full Code Here

   
    // defaultPriority=DEBUG
    UNDEF.log(Priority.FATAL, "Message " + i); i++;  // 19
    UNDEF.error("Message " + i); i++;        
    UNDEF.warn ("Message " + i); i++;
    UNDEF.info ("Message " + i); i++;
    UNDEF.debug("Message " + i, new Exception("Just testing.")); i++;   

    // -------------------------------------------------
    // The following should not log
    ERR.warn("Message " + i);  i++;
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

   
    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);
View Full Code Here

    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);
View Full Code Here

    CountingAppender ca = new CountingAppender();
    a.addAppender(ca);
   
                   assertEquals(ca.counter, 0);
    ab.debug(MSG); assertEquals(ca.counter, 1);
    ab.info(MSG);  assertEquals(ca.counter, 2);
    ab.warn(MSG);  assertEquals(ca.counter, 3);
    ab.error(MSG); assertEquals(ca.counter, 4);   
   

  }
View Full Code Here

    Hierarchy h = Category.getDefaultHierarchy();
    h.disableDebug();
    assertEquals(caRoot.counter, 0);    

    root.debug(MSG); assertEquals(caRoot.counter, 0)
    root.info(MSG); assertEquals(caRoot.counter, 1)
    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 2)
    root.warn(MSG); assertEquals(caRoot.counter, 3)

    h.disableInfo();
    root.debug(MSG); assertEquals(caRoot.counter, 3)
View Full Code Here

    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 2)
    root.warn(MSG); assertEquals(caRoot.counter, 3)

    h.disableInfo();
    root.debug(MSG); assertEquals(caRoot.counter, 3)
    root.info(MSG); assertEquals(caRoot.counter, 3)
    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 4)
    root.error(MSG); assertEquals(caRoot.counter, 5)
    root.log(Priority.ERROR, MSG); assertEquals(caRoot.counter, 6)

    h.disableAll();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.