Examples of removeHandler()


Examples of java.util.logging.Logger.removeHandler()

    // Setup the file logger.
      final Logger logger = Logger.getAnonymousLogger();
      logger.setLevel(Level.INFO);
      logger.setUseParentHandlers(false);
      for (final Handler h : logger.getHandlers())
          logger.removeHandler(h);
      if (fileHandler != null) {
          fileHandler.close();
          logger.removeHandler(fileHandler);
          fileHandler = null;
      }
View Full Code Here

Examples of java.util.logging.Logger.removeHandler()

      logger.setUseParentHandlers(false);
      for (final Handler h : logger.getHandlers())
          logger.removeHandler(h);
      if (fileHandler != null) {
          fileHandler.close();
          logger.removeHandler(fileHandler);
          fileHandler = null;
      }
      try {
          try {
              logFile.getParentFile().mkdirs();
View Full Code Here

Examples of java.util.logging.Logger.removeHandler()

        final Logger rootLogger = LogManager.getLogManager().getLogger("");
        final Handler[] handlers = rootLogger.getHandlers();

        if (!ArrayUtils.isEmpty(handlers)) {
            for (final Handler handler : handlers) {
                rootLogger.removeHandler(handler);
            }
        }
        // and then we let jul-to-sfl4j do its magic so that jersey messages go to sfl4j (and thus log4j)
        SLF4JBridgeHandler.install();
View Full Code Here

Examples of java.util.logging.Logger.removeHandler()

         int returnCode = new MavenCli().doMain(params, getFaceted().getRoot().getFullyQualifiedName(), out, err);
         return returnCode == 0;
      }
      finally
      {
         globalLogger.removeHandler(outHandler);
      }
   }

   @Override
   public boolean executeMaven(final List<String> parameters)
View Full Code Here

Examples of java.util.logging.Logger.removeHandler()

            assertNotNull(theTestLoggingHandler.getLastMessage());
            assertTrue(theTestLoggingHandler.getLastMessage().contains("close") || theTestLoggingHandler.getLastMessage().contains("closing"));
        } finally {
            theLogger.setLevel(theOldLevel);
            theLogger.removeHandler(theTestLoggingHandler);
        }
    }

    @Test
    public void testListen_Error_2() throws Exception {
View Full Code Here

Examples of java.util.logging.Logger.removeHandler()

            assertNotNull(theTestLoggingHandler.getLastMessage());
            assertTrue(theTestLoggingHandler.getLastMessage().contains("Flush") || theTestLoggingHandler.getLastMessage().contains("flush"));
        } finally {
            theLogger.setLevel(theOldLevel);
            theLogger.removeHandler(theTestLoggingHandler);
        }
    }

    @Test
    public void testListen_Error_3() throws Exception {
View Full Code Here

Examples of java.util.logging.Logger.removeHandler()

        final Logger rootLogger = Logger.getLogger("");
        for (Handler handler : rootLogger.getHandlers()) {
            if (handler instanceof ConsoleHandler) {
                if (consoleHandler != null) {
                    // duplicate handlers
                    rootLogger.removeHandler(handler);
                } else {
                    consoleHandler = handler;
                    ((ConsoleHandler)consoleHandler).setWriter(new SynchronizedWriter(System.out));
                }
            }
View Full Code Here

Examples of jinngine.physics.constraint.contact.ContactConstraintManager.removeHandler()

 
  @Override
  public void cleanup(Scene scene) {
    // remove the handler that we previously installed in the contact constraint manager
    ContactConstraintManager manager = scene.getContactConstraintManager();   
    manager.removeHandler(contactConstraintHandler);
  }

  @Override
  public void setup(Scene scene) {
    // first of, find contact constraints that involves the body we want to monitor
View Full Code Here

Examples of net.sf.jpluck.util.LogUtil.removeHandler()

    running = false;
    conversionActive = false;
    fireConversionFinished();
    logUtil.close();
    if (fileHandler != null) {
      logUtil.removeHandler(fileHandler);
    }
    if ((window != null) && (failCount == 0) && ClientConfiguration.getDefault().isAutoCloseConversion()) {
      window.hide();
    }
  }
View Full Code Here

Examples of org.apache.axis2.engine.Phase.removeHandler()

        String phaseName = handler.getRules().getPhaseName();
        Iterator phaseItr = phaseList.iterator();
        while (phaseItr.hasNext()) {
            Phase phase = (Phase) phaseItr.next();
            if (phase.getPhaseName().equals(phaseName)) {
                phase.removeHandler(handler);
                break;
            }
        }
    }
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.