Package org.apache.log4j

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


    Category log4jCategory = Logger.getLogger("b");

    int n = 0;

    log4jLogger.log(org.apache.log4j.Level.DEBUG, "hello"+(++n));
    log4jCategory.log(org.apache.log4j.Level.DEBUG, "world"+(++n));
   
    assertEquals(n, listHandler.list.size());

    for (int i = 0; i < n; i++) {
      LogRecord logRecord = (LogRecord) listHandler.list.get(i);
View Full Code Here


     * @param channel channel name used for logging
     * @param level level used for logging
     */
    public void log(Object data, Throwable throwable, String channel, int level) {
        Category cat = getCategory(channel);
        cat.log(toPriority(level), data, throwable);
    }

   
    /**
     * Log an object thru the specified channel and with the specified level.
View Full Code Here

     * @param level The level used for logging.
     */
    public void log(Object data, String channel, int level) {
        Category cat = getCategory(channel);
    if (data instanceof Throwable)
            cat.log(toPriority(level), data, (Throwable)data);
        else 
            cat.log(toPriority(level), data);
    }
   
   
View Full Code Here

    public void log(Object data, String channel, int level) {
        Category cat = getCategory(channel);
    if (data instanceof Throwable)
            cat.log(toPriority(level), data, (Throwable)data);
        else 
            cat.log(toPriority(level), data);
    }
   
   
    /**
     * Log an object with the specified level.
View Full Code Here

     * @param channel channel name used for logging
     * @param level level used for logging
     */
    public void log(Object data, Throwable throwable, String channel, int level) {
        Category cat = getCategory(channel);
        cat.log(toLevel(level), data, throwable);
    }

   
    /**
     * Log an object thru the specified channel and with the specified level.
View Full Code Here

     * @param level The level used for logging.
     */
    public void log(Object data, String channel, int level) {
        Category cat = getCategory(channel);
    if (data instanceof Throwable)
            cat.log(toLevel(level), data, (Throwable)data);
        else 
            cat.log(toLevel(level), data);
    }
   
   
View Full Code Here

    public void log(Object data, String channel, int level) {
        Category cat = getCategory(channel);
    if (data instanceof Throwable)
            cat.log(toLevel(level), data, (Throwable)data);
        else 
            cat.log(toLevel(level), data);
    }
   
   
    /**
     * Log an object with the specified level.
View Full Code Here

     * @param channel channel name used for logging
     * @param level level used for logging
     */
    public void log(Object data, Throwable throwable, String channel, int level) {
        Category cat = getCategory(channel);
        cat.log(toPriority(level), data, throwable);
    }

   
    /**
     * Log an object thru the specified channel and with the specified level.
View Full Code Here

     * @param level The level used for logging.
     */
    public void log(Object data, String channel, int level) {
        Category cat = getCategory(channel);
    if (data instanceof Throwable)
            cat.log(toPriority(level), data, (Throwable)data);
        else 
            cat.log(toPriority(level), data);
    }
   
   
View Full Code Here

    public void log(Object data, String channel, int level) {
        Category cat = getCategory(channel);
    if (data instanceof Throwable)
            cat.log(toPriority(level), data, (Throwable)data);
        else 
            cat.log(toPriority(level), data);
    }
   
   
    /**
     * Log an object with the specified level.
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.