Package org.apache.log4j

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


            Assert.assertTrue("waiting for server 1 down",
                    ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT_QP1,
                            ClientBase.CONNECTION_TIMEOUT));

        } finally {
            qlogger.removeAppender(appender);
        }

        LineNumberReader r = new LineNumberReader(new StringReader(os.toString()));
        String line;
        boolean found = false;
View Full Code Here


            Assert.assertTrue("waiting for server 3 down",
                    ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT_QP3,
                            ClientBase.CONNECTION_TIMEOUT));

        } finally {
            qlogger.removeAppender(appender);
        }

        LineNumberReader r = new LineNumberReader(new StringReader(os.toString()));
        String line;
        boolean warningPresent = false;
View Full Code Here

            Assert.assertTrue("waiting for server 2 down",
                    ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT_QP2,
                            ClientBase.CONNECTION_TIMEOUT));

        } finally {
            zlogger.removeAppender(appender);
        }
        os.close();
        LineNumberReader r = new LineNumberReader(new StringReader(os.toString()));
        String line;
        boolean found = false;
View Full Code Here

                    CreateMode.PERSISTENT);

            // resume poor fellow
            qu.getPeer(1).peer.resume();
        } finally {
            zlogger.removeAppender(appender);
        }

        os.close();
        LineNumberReader r = new LineNumberReader(new StringReader(os
                .toString()));
View Full Code Here

      @Override
      public void windowDeactivated(WindowEvent e) {
      }
      @Override
      public void windowClosing(WindowEvent e) {
        rootLogger.removeAppender(uiAppender);
      }
      @Override
      public void windowClosed(WindowEvent e) {
      }
      @Override
View Full Code Here

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


   public void testConfigWarnings() throws Exception {
View Full Code Here

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


   public void testConfigWarnings() throws Exception {
View Full Code Here

          Logger l = (Logger) loggers.elementAt(i);
          LogLog.debug("FB: Searching for ["+primary.getName()+"] in logger ["
           +l.getName() + "].");
          LogLog.debug("FB: Replacing ["+primary.getName()+"] by ["
           + backup.getName() + "] in logger ["+ l.getName() +"].");
          l.removeAppender(primary);
          LogLog.debug("FB: Adding appender ["+backup.getName()+"] to logger "
           +  l.getName());
          l.addAppender(backup);
        }
    }   
View Full Code Here

        "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

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


   public void testConfigWarnings() throws Exception {
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.