Examples of removeAppender()


Examples of org.apache.log4j.Logger.removeAppender()

      catch(Exception e) { return; }
      if(i == -1) break;
      if(i == 'q') break;
      if(i == 'r') {
  System.out.println("Removing appender S");
  root.removeAppender("S");
      }
    }
  }

  static
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

        "Could not find appender " + Constants.TEMP_LIST_APPENDER_NAME;
      errorList.add(new ErrorItem(errMsg));
      return;
    }
    consoleAppender.close();
    ll.removeAppender(consoleAppender);
  }
 
  /**
   * Dump any errors on System.out.
   */
 
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

      //if(l.isAttached(primary)) {
      logger.debug(
        "FB: Replacing [" + primary.getName() + "] by [" + backup.getName()
        + "] in logger [" + l.getName() + "].");
      l.removeAppender(primary);
      logger.debug(
        "FB: Adding appender [{}] to logger {}",  backup.getName(), l.getName());
      l.addAppender(backup);
    }
  }
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

    }

    @After
    public void tearDown() {
        Logger rootLogger = Logger.getRootLogger();
        rootLogger.removeAppender(appender);
    }

    @AfterClass
    public static void oneTimeTearDown() throws Exception {
        try {
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

   @AfterMethod
   public void tearDownTest()
   {
      Logger log4jLogger = Logger.getRootLogger();
      log4jLogger.setLevel(oldLevel);
      log4jLogger.removeAppender(appender);
      appender.close();
   }

   public void testSchemaValidity()
   {
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

      LogLog.debug("FB: Searching for ["+primary.getName()+"] in logger"
       +l.getName());
      //if(l.isAttached(primary)) {
      LogLog.debug("FB: Replacing ["+primary.getName()+"] by ["
       + backup.getName() + " in logger"+ l);
      l.removeAppender(primary);
      LogLog.debug("FB: Adding appender ["+backup.getName()+"] to logger "
       +  l.getName());
      l.addAppender(backup);
    }   
  }
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

      }

      assertFalse(listAppender.getMessages().isEmpty());
      assertTrue(listAppender.getMessages().get(0).startsWith("Too many delayed calls"));

      log.removeAppender(listAppender);
    } finally {
      rpcClient.stop();
    }
  }
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

          Appender appender = logger.getAppender("ASYNC");
          if (null != appender) {
            log.info("Closing log-forwarding appender");
            appender.close();
            log.info("Removing log-forwarding appender");
            logger.removeAppender(appender);
            loggingDisabled = true;
          }
        }
      }
    } catch (IllegalArgumentException e) {
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

    assertFalse(listAppender.getMessages().isEmpty());
    assertTrue(listAppender.getMessages().get(0).startsWith(
        "Too many delayed calls"));

    log.removeAppender(listAppender);
  }

  public interface TestRpc extends VersionedProtocol {
    public static final long VERSION = 1L;
    int test(boolean delay);
View Full Code Here

Examples of org.apache.log4j.Logger.removeAppender()

      }

      assertFalse(listAppender.getMessages().isEmpty());
      assertTrue(listAppender.getMessages().get(0).startsWith("Too many delayed calls"));

      log.removeAppender(listAppender);
    } finally {
      rpcClient.stop();
    }
  }
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.