new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/LoggingUtil.java
public static void generateLog(Object itInstance, List namespaces) {
    LoggingFacade logger = getLogger();
    logger.info("Generating logs...");
    String resultDirExt = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
    try {
      Path resultDir = Files.createDirectories(
          Paths.get(TestConstants.LOGS_DIR, itInstance.getClass().getSimpleName(),
              resultDirExt));
      for (var namespace : namespaces) {
        LoggingUtil.collectLogs((String) namespace, resultDir.toString());
      }
    } catch (IOException ex) {
      logger.severe(ex.getMessage());
    }
  }
/**
   * Collect logs for artifacts in Kubernetes cluster for current running test object. This method can be called
   * anywhere in the test by passing the test instance object and namespaces list.
   *
   * <p>The collected logs are written in the LOGS_DIR/IT_TEST_CLASSNAME/CURRENT_TIMESTAMP directory.
   *
   * @param itInstance the integration test instance
   * @param namespaces list of namespaces used by the test instance
   */
Collect logs for artifacts in Kubernetes cluster for current running test object. This method can be called
anywhere in the test by passing the test instance object and namespaces list.



@param itInstance the integration test instance
@param namespaces list of namespaces used by the test instance
Collect logs for artifacts in Kubernetes cluster for current running test object . This method can be called anywhere in the test by passing the test instance object and namespaces list . @param itInstance the integration test instance @param namespaces list of namespaces used by the test instance
public static void generateLog(Object itInstance, List namespaces) {
    LoggingFacade logger = getLogger();
    logger.info("Generating logs...");
    String resultDirExt = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
    try {
      Path resultDir = Files.createDirectories(
          Paths.get(TestConstants.LOGS_DIR, itInstance.getClass().getSimpleName(),
              resultDirExt));
      for (var namespace : namespaces) {
        LoggingUtil.collectLogs((String) namespace, resultDir.toString());
      }
    } catch (IOException ex) {
      logger.severe(ex.getMessage());
    }
  }
public static void generateLog ( Object itInstance , List namespaces ) { LoggingFacade logger = getLogger ( ) ; logger . info ( "Generating logs..." ) ; String resultDirExt = new SimpleDateFormat ( "yyyyMMddHHmmss" ) . format ( new Date ( ) ) ; try { Path resultDir = Files . createDirectories ( Paths . get ( TestConstants . LOGS_DIR , itInstance . getClass ( ) . getSimpleName ( ) , resultDirExt ) ) ; for ( var namespace : namespaces ) { LoggingUtil . collectLogs ( ( String ) namespace , resultDir . toString ( ) ) ; } } catch ( IOException ex ) { logger . severe ( ex . getMessage ( ) ) ; } }
Collect logs for artifacts in Kubernetes cluster for current running test object.
Collect logs for artifacts in Kubernetes cluster for current running test object .