Examples of removeAppender()


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

      if (currentJob != this) {
          closeStats(logger, this);
      }
            if (tempAppender != null) {
                tempAppender.close();
                logger.removeAppender(tempAppender);
            }
    }

  }
View Full Code Here

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

    } finally {
      txn.close();
    }

    source.stop();
    logger.removeAppender(appender);

    Assert.assertNotNull(e);
    Assert.assertEquals(String.valueOf(SyslogAppender.LOG_FTP / 8),
        e.getHeaders().get(SyslogUtils.SYSLOG_FACILITY));
    Assert.assertArrayEquals(e.getBody(), "test flume syslog".getBytes());
View Full Code Here

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

    } finally {
      txn.close();
    }

    source.stop();
    logger.removeAppender(appender);

    Assert.assertNotNull(e);
    Assert.assertEquals(e.getHeaders().get(SyslogUtils.SYSLOG_FACILITY), String.valueOf(SyslogAppender.LOG_FTP));
    Assert.assertArrayEquals(e.getBody(),"test flume syslog".getBytes());
  }
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()

            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

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

            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

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.getName() +"].");
      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()

            assertTrue("waiting for server 1 down",
                    ClientBase.waitForServerDown("localhost:" + 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

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

            assertTrue("waiting for server 2 down",
                    ClientBase.waitForServerDown("localhost:" + 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

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 {
      clientEngine.close();
    }
  }
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.