From 90ef81af142cee8d259dc085b5fd9d091696f9bb Mon Sep 17 00:00:00 2001 From: Cheryl King Date: Mon, 11 Dec 2023 10:48:53 -0600 Subject: [PATCH] Remove kernel logging for non-debug case --- .../common/plugins/util/InstallFeatureUtil.java | 14 +++++++------- .../common/plugins/util/ServerFeatureUtil.java | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java index 1b4f76e9..ea2fd46b 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java +++ b/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java @@ -699,7 +699,7 @@ public void installFeatures(boolean isAcceptLicense, List featuresList) } if(featuresToInstall.isEmpty()) { - debug("featuresToInstall is empty"); + debug("featuresToInstall is empty"); return; } @@ -724,20 +724,20 @@ public void installFeatures(boolean isAcceptLicense, List featuresList) disableCacheInURLClassLoader(); try { String bundle = getOverrideBundleDescriptor(OPEN_LIBERTY_GROUP_ID, REPOSITORY_RESOLVER_ARTIFACT_ID); - mapBasedInstallKernel = createMapBasedInstallKernelInstance(bundle, installDirectory); + mapBasedInstallKernel = createMapBasedInstallKernelInstance(bundle, installDirectory); - Collection resolvedFeatures = resolveFeatures(featuresToInstall, jsonRepos, acceptLicenseMapValue, pluginListedEsas); - if(resolvedFeatures == null || resolvedFeatures.isEmpty()) { - return; - } + Collection resolvedFeatures = resolveFeatures(featuresToInstall, jsonRepos, acceptLicenseMapValue, pluginListedEsas); + if(resolvedFeatures == null || resolvedFeatures.isEmpty()) { + return; + } Map artifactsToExt = downloadEsas(resolvedFeatures, featureToExtMap); Set artifacts = artifactsToExt.keySet(); if (verifyOption != null && verifyOption != VerifyOption.skip) { - verifyFeatures(artifacts, installJarURL); + verifyFeatures(artifacts, installJarURL); } diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/ServerFeatureUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/ServerFeatureUtil.java index bb4cedc8..df415612 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/util/ServerFeatureUtil.java +++ b/src/main/java/io/openliberty/tools/common/plugins/util/ServerFeatureUtil.java @@ -657,7 +657,7 @@ private Map getInstallMapObject() */ protected Map createMapBasedInstallKernelInstance(String bundle, File installDirectory) throws PrivilegedActionException, PluginExecutionException, MalformedURLException { - mapBasedInstallKernel = getInstallMapObject(); + mapBasedInstallKernel = getInstallMapObject(); // Init if (bundle != null) { @@ -680,11 +680,11 @@ protected Map createMapBasedInstallKernelInstance(String bundle, debug("install.kernel.init.error.message: " + mapBasedInstallKernel.get("install.kernel.init.error.message")); File usrDir = new File(installDirectory, "usr"); mapBasedInstallKernel.put("target.user.directory", usrDir); - if (isDebugEnabled()) { - mapBasedInstallKernel.put("debug", Level.FINEST); - }else { + if (isDebugEnabled()) { + mapBasedInstallKernel.put("debug", Level.FINEST); + } /* else { removed due to "java.lang.ClassNotFoundException: com.ibm.websphere.ras.DataFormatHelper" reported in ci.gradle issue 867 mapBasedInstallKernel.put("debug", Level.INFO); - } + } */ return mapBasedInstallKernel; }