Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for removeHandler (0.14 sec)

  1. okhttp/src/test/java/okhttp3/TestLogHandler.kt

        previousLevel = logger.level
        logger.addHandler(handler)
        logger.setLevel(Level.FINEST)
      }
    
      override fun afterEach(context: ExtensionContext?) {
        logger.setLevel(previousLevel)
        logger.removeHandler(handler)
      }
    
      override fun apply(
        base: Statement,
        description: Description,
      ): Statement {
        return object : Statement() {
          override fun evaluate() {
            beforeEach(null)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. android/guava-testlib/test/com/google/common/testing/TestLogHandlerTest.java

            new TearDown() {
              @Override
              public void tearDown() throws Exception {
                ExampleClassUnderTest.logger.setUseParentHandlers(true);
                ExampleClassUnderTest.logger.removeHandler(handler);
              }
            });
      }
    
      public void test() throws Exception {
        assertTrue(handler.getStoredLogRecords().isEmpty());
        ExampleClassUnderTest.foo();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/TestLogHandler.java

     *     super.setUp();
     *     handler = new TestLogHandler();
     *     SomeClass.logger.addHandler(handler);
     *     addTearDown(new TearDown() {
     *       public void tearDown() throws Exception {
     *         SomeClass.logger.removeHandler(handler);
     *       }
     *     });
     *   }
     *
     *   public void test() {
     *     SomeClass.foo();
     *     LogRecord firstRecord = handler.getStoredLogRecords().get(0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 20:53:25 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpDebugLogging.kt

      ): Closeable {
        val logger = Logger.getLogger(loggerClass)
        if (configuredLoggers.add(logger)) {
          logger.addHandler(handler)
          logger.level = Level.FINEST
        }
        return Closeable {
          logger.removeHandler(handler)
        }
      }
    
      fun enable(loggerClass: KClass<*>) = enable(loggerClass.java.name)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/TestLogHandlerTest.java

            new TearDown() {
              @Override
              public void tearDown() throws Exception {
                ExampleClassUnderTest.logger.setUseParentHandlers(true);
                ExampleClassUnderTest.logger.removeHandler(handler);
              }
            });
      }
    
      public void test() throws Exception {
        assertTrue(handler.getStoredLogRecords().isEmpty());
        ExampleClassUnderTest.foo();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/testing/TestLogHandler.java

     *     super.setUp();
     *     handler = new TestLogHandler();
     *     SomeClass.logger.addHandler(handler);
     *     addTearDown(new TearDown() {
     *       public void tearDown() throws Exception {
     *         SomeClass.logger.removeHandler(handler);
     *       }
     *     });
     *   }
     *
     *   public void test() {
     *     SomeClass.foo();
     *     LogRecord firstRecord = handler.getStoredLogRecords().get(0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 20:53:25 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        logger.setLevel(Level.SEVERE);
        TestLogHandler logHandler = new TestLogHandler();
        logger.addHandler(logHandler);
        try {
          queue.dispatch();
        } finally {
          logger.removeHandler(logHandler);
        }
    
        assertEquals(1, logHandler.getStoredLogRecords().size());
        assertEquals(
            "Exception while executing callback: MyListener custom-label",
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        logger.setLevel(Level.SEVERE);
        TestLogHandler logHandler = new TestLogHandler();
        logger.addHandler(logHandler);
        try {
          queue.dispatch();
        } finally {
          logger.removeHandler(logHandler);
        }
    
        assertEquals(1, logHandler.getStoredLogRecords().size());
        assertEquals(
            "Exception while executing callback: MyListener custom-label",
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.2K bytes
    - Viewed (0)
Back to top