new-integration-tests/src/test/java/oracle/weblogic/kubernetes/extensions/IntegrationTestWatcher.java
private void collectLogs(ExtensionContext extensionContext, String failedStage) {
    getLogger().info("Collecting logs...");
    if (namespaces == null || namespaces.isEmpty()) {
      getLogger().warning("Namespace list is empty, "
          + "see if the methods in the tests is(are) annotated with Namespaces(<n>)");
      return;
    }
    Path resultDir = null;
    try {
      resultDir = Files.createDirectories(Paths.get(TestConstants.LOGS_DIR,
              extensionContext.getRequiredTestClass().getSimpleName(),
              getExtDir(extensionContext, failedStage)));
    } catch (IOException ex) {
      getLogger().warning(ex.getMessage());
    }
    for (var namespace : namespaces) {
      LoggingUtil.collectLogs((String)namespace, resultDir.toString());
    }
  }
/**
   * Collects logs in namespaces used by the current running test and writes in the LOGS_DIR.
   * @param extensionContext current extension context
   * @param failedStage the stage in which the test failed
   */
Collects logs in namespaces used by the current running test and writes in the LOGS_DIR.
@param extensionContext current extension context
@param failedStage the stage in which the test failed
Collects logs in namespaces used by the current running test and writes in the LOGS_DIR . @param extensionContext current extension context @param failedStage the stage in which the test failed
private void collectLogs(ExtensionContext extensionContext, String failedStage) {
    getLogger().info("Collecting logs...");
    if (namespaces == null || namespaces.isEmpty()) {
      getLogger().warning("Namespace list is empty, "
          + "see if the methods in the tests is(are) annotated with Namespaces(<n>)");
      return;
    }
    Path resultDir = null;
    try {
      resultDir = Files.createDirectories(Paths.get(TestConstants.LOGS_DIR,
              extensionContext.getRequiredTestClass().getSimpleName(),
              getExtDir(extensionContext, failedStage)));
    } catch (IOException ex) {
      getLogger().warning(ex.getMessage());
    }
    for (var namespace : namespaces) {
      LoggingUtil.collectLogs((String)namespace, resultDir.toString());
    }
  }
private void collectLogs ( ExtensionContext extensionContext , String failedStage ) { getLogger ( ) . info ( "Collecting logs..." ) ; if ( namespaces == null || namespaces . isEmpty ( ) ) { getLogger ( ) . warning ( "Namespace list is empty, " + "see if the methods in the tests is(are) annotated with Namespaces(<n>)" ) ; return ; } Path resultDir = null ; try { resultDir = Files . createDirectories ( Paths . get ( TestConstants . LOGS_DIR , extensionContext . getRequiredTestClass ( ) . getSimpleName ( ) , getExtDir ( extensionContext , failedStage ) ) ) ; } catch ( IOException ex ) { getLogger ( ) . warning ( ex . getMessage ( ) ) ; } for ( var namespace : namespaces ) { LoggingUtil . collectLogs ( ( String ) namespace , resultDir . toString ( ) ) ; } }
Collects logs in namespaces used by the current running test and writes in the LOGS_DIR.
Collects logs in namespaces used by the current running test and writes in the LOGS_DIR .