# HG changeset patch # User herrick # Date 1541692588 18000 # Node ID a828547f7e506985c042c721188e6d775691552f # Parent 585939d9f952f403591e27c081b9892b2da339cd 8213394: Stop using Log.info() except for expected output. Reviewed-by: almatvee diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/linux/classes/jdk/jpackager/internal/builders/linux/LinuxAppImageBuilder.java --- a/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/builders/linux/LinuxAppImageBuilder.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/builders/linux/LinuxAppImageBuilder.java Thu Nov 08 10:56:28 2018 -0500 @@ -82,7 +82,7 @@ params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".png")) { - Log.info(MessageFormat.format(I18N.getString( + Log.error(MessageFormat.format(I18N.getString( "message.icon-not-png"), f)); return null; } @@ -214,7 +214,7 @@ copyIcon(); } catch (IOException ex) { - Log.info("Exception: " + ex); + Log.error("Exception: " + ex); Log.debug(ex); } } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxAppBundler.java --- a/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxAppBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxAppBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -71,7 +71,7 @@ params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".png")) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("message.icon-not-png"), f)); return null; } @@ -173,7 +173,7 @@ } return rootDirectory; } catch (Exception ex) { - Log.info("Exception: "+ex); + Log.error("Exception: "+ex); Log.debug(ex); return null; } @@ -192,7 +192,7 @@ } return rootDirectory; } catch (Exception ex) { - Log.info("Exception: "+ex); + Log.error("Exception: "+ex); Log.debug(ex); return null; } @@ -217,7 +217,7 @@ rootDirectory.mkdirs(); if (!dependentTask) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.creating-bundle-location"), rootDirectory.getAbsolutePath())); } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxDebBundler.java --- a/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxDebBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxDebBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -306,7 +306,7 @@ } } } else { - Log.info(I18N.getString("message.debs-like-licenses")); + Log.verbose(I18N.getString("message.debs-like-licenses")); } // only one mime type per association, at least one file extention @@ -413,7 +413,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(imageDir); } else if (imageDir != null) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.debug-working-directory"), imageDir.getAbsolutePath())); } @@ -606,7 +606,7 @@ File faIcon = FA_ICON.fetchFrom(assoc); List extensions = FA_EXTENSIONS.fetchFrom(assoc); if (extensions == null) { - Log.info(I18N.getString( + Log.error(I18N.getString( "message.creating-association-with-null-extension")); } @@ -904,7 +904,7 @@ pb = pb.directory(DEB_IMAGE_DIR.fetchFrom(params).getParentFile()); IOUtils.exec(pb, false); - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.output-to-location"), outFile.getAbsolutePath())); return outFile; diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxRpmBundler.java --- a/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxRpmBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/linux/classes/jdk/jpackager/internal/linux/LinuxRpmBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -325,7 +325,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(imageDir); } else if (imageDir != null) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.debug-working-directory"), imageDir.getAbsolutePath())); } @@ -504,7 +504,7 @@ File faIcon = FA_ICON.fetchFrom(assoc); //TODO FA_ICON_PNG List extensions = FA_EXTENSIONS.fetchFrom(assoc); if (extensions == null) { - Log.info(I18N.getString( + Log.verbose(I18N.getString( "message.creating-association-with-null-extension")); } @@ -717,7 +717,7 @@ IOUtils.deleteRecursive(broot); } - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.output-bundle-location"), outdir.getAbsolutePath())); diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/builders/mac/MacAppImageBuilder.java --- a/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/builders/mac/MacAppImageBuilder.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/builders/mac/MacAppImageBuilder.java Thu Nov 08 10:56:28 2018 -0500 @@ -182,7 +182,7 @@ params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".icns")) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("message.icon-not-icns"), f)); return null; } @@ -477,7 +477,7 @@ if (MAC_CF_BUNDLE_NAME.fetchFrom(params) != null) { String bn = MAC_CF_BUNDLE_NAME.fetchFrom(params); if (bn.length() > 16) { - Log.info(MessageFormat.format(I18N.getString( + Log.error(MessageFormat.format(I18N.getString( "message.bundle-name-too-long-warning"), MAC_CF_BUNDLE_NAME.getID(), bn)); } @@ -613,7 +613,7 @@ List extensions = FA_EXTENSIONS.fetchFrom(fileAssociation); if (extensions == null) { - Log.info(I18N.getString( + Log.verbose(I18N.getString( "message.creating-association-with-null-extension")); } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacAppBundler.java --- a/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacAppBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacAppBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -201,7 +201,7 @@ VERBOSE.fetchFrom(params)); if (!certificate.isValid()) { - Log.info(MessageFormat.format(I18N.getString( + Log.error(MessageFormat.format(I18N.getString( "error.certificate.expired"), result)); } } @@ -228,7 +228,7 @@ params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".icns")) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("message.icon-not-icns"), f)); return null; } @@ -375,14 +375,10 @@ return predefined; } return rootDirectory; - } catch (IOException ex) { - Log.info(ex.toString()); + } catch (Exception ex) { + Log.error("Exception: "+ex); Log.verbose(ex); return null; - } catch (Exception ex) { - Log.info("Exception: "+ex); - Log.debug(ex); - return null; } } @@ -399,14 +395,10 @@ StandardBundlerParam.copyPredefinedRuntimeImage(p, appBuilder); } return rootDirectory; - } catch (IOException ex) { - Log.info(ex.toString()); + } catch (Exception ex) { + Log.error("Exception: "+ex); Log.verbose(ex); return null; - } catch (Exception ex) { - Log.info("Exception: "+ex); - Log.debug(ex); - return null; } } @@ -430,7 +422,7 @@ rootDirectory.mkdirs(); if (!dependentTask) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.creating-app-bundle"), rootDirectory.getAbsolutePath())); } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacAppStoreBundler.java --- a/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacAppStoreBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacAppStoreBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -81,7 +81,7 @@ VERBOSE.fetchFrom(params)); if (!certificate.isValid()) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("error.certificate.expired"), result)); } @@ -109,7 +109,7 @@ result, VERBOSE.fetchFrom(params)); if (!certificate.isValid()) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("error.certificate.expired"), result)); } @@ -144,8 +144,8 @@ //@Override public File bundle(Map p, File outdir) { - Log.info(MessageFormat.format(I18N.getString("message.building-bundle"), - APP_NAME.fetchFrom(p))); + Log.verbose(MessageFormat.format(I18N.getString( + "message.building-bundle"), APP_NAME.fetchFrom(p))); if (!outdir.isDirectory() && !outdir.mkdirs()) { throw new RuntimeException(MessageFormat.format(I18N.getString( "error.cannot-create-output-dir"), @@ -220,9 +220,8 @@ IOUtils.exec(pb, false); return finalPKG; } catch (Exception ex) { - Log.info("App Store Ready Bundle failed : " + ex.getMessage()); - ex.printStackTrace(); - Log.debug(ex); + Log.error("App Store Ready Bundle failed : " + ex.getMessage()); + Log.verbose(ex); return null; } finally { try { @@ -233,7 +232,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(appImageDir); } else if (appImageDir != null) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "mesasge.intermediate-bundle-location"), appImageDir.getAbsolutePath())); } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacBaseInstallerBundler.java --- a/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacBaseInstallerBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacBaseInstallerBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -229,12 +229,12 @@ Pattern p = Pattern.compile("\"alis\"=\"([^\"]+)\""); Matcher m = p.matcher(baos.toString()); if (!m.find()) { - Log.info("Did not find a key matching '" + key + "'"); + Log.error("Did not find a key matching '" + key + "'"); return null; } String matchedKey = m.group(1); if (m.find()) { - Log.info("Found more than one key matching '" + key + "'"); + Log.error("Found more than one key matching '" + key + "'"); return null; } Log.debug("Using key '" + matchedKey + "'"); diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacDmgBundler.java --- a/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacDmgBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacDmgBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -64,7 +64,7 @@ } public File bundle(Map params, File outdir) { - Log.info(MessageFormat.format(I18N.getString("message.building-dmg"), + Log.verbose(MessageFormat.format(I18N.getString("message.building-dmg"), APP_NAME.fetchFrom(params))); if (!outdir.isDirectory() && !outdir.mkdirs()) { throw new RuntimeException(MessageFormat.format( @@ -85,7 +85,7 @@ prepareConfigFiles(params)) { File configScript = getConfig_Script(params); if (configScript.exists()) { - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.running-script"), configScript.getAbsolutePath())); IOUtils.run("bash", configScript, false); @@ -106,7 +106,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(appImageDir); } else if (appImageDir != null) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.intermediate-image-location"), appImageDir.getAbsolutePath())); } @@ -415,9 +415,8 @@ mountedRoot.getAbsolutePath()); IOUtils.exec(pb, false); } catch (IOException ex) { - Log.info(ex.getMessage()); - Log.verbose( - "Cannot enable custom icon using SetFile utility"); + Log.error(ex.getMessage()); + Log.verbose("Cannot enable custom icon using SetFile utility"); } } else { Log.verbose( @@ -475,7 +474,7 @@ //Delete the temporary image protoDMG.delete(); - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.output-to-location"), APP_NAME.fetchFrom(p), finalDMG.getAbsolutePath())); diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacPkgBundler.java --- a/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacPkgBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/macosx/classes/jdk/jpackager/internal/mac/MacPkgBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -124,7 +124,7 @@ result, VERBOSE.fetchFrom(params)); if (!certificate.isValid()) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("error.certificate.expired"), result)); } @@ -162,7 +162,7 @@ } public File bundle(Map params, File outdir) { - Log.info(MessageFormat.format(I18N.getString("message.building-pkg"), + Log.verbose(MessageFormat.format(I18N.getString("message.building-pkg"), APP_NAME.fetchFrom(params))); if (!outdir.isDirectory() && !outdir.mkdirs()) { throw new RuntimeException(MessageFormat.format( @@ -183,7 +183,7 @@ File configScript = getConfig_Script(params); if (configScript.exists()) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.running-script"), configScript.getAbsolutePath())); IOUtils.run("bash", configScript, false); @@ -204,7 +204,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(appImageDir); } else if (appImageDir != null) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.intermediate-image-location"), appImageDir.getAbsolutePath())); } @@ -452,7 +452,7 @@ (Platform.getMajorVersion() == 10 && Platform.getMinorVersion() >= 12)) { // we need this for OS X 10.12+ - Log.info(I18N.getString("message.signing.pkg")); + Log.verbose(I18N.getString("message.signing.pkg")); } String signingIdentity = diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/AbstractBundler.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/AbstractBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/AbstractBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -79,7 +79,7 @@ } } else { if (verbose) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.using-default-resource"), category == null ? "" : "[" + category + "] ", publicName)); @@ -101,7 +101,7 @@ } else { IOUtils.copyFile(defaultFile, result); if (verbose) { - Log.info(MessageFormat.format(I18N.getString( + Log.verbose(MessageFormat.format(I18N.getString( "message.using-custom-resource-from-file"), category == null ? "" : "[" + category + "] ", defaultFile.getAbsoluteFile())); @@ -143,7 +143,7 @@ category == null ? "" : "[" + category + "] ", publicName); } - Log.info(msg); + Log.verbose(msg); } return is; } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/Arguments.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/Arguments.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/Arguments.java Thu Nov 08 10:56:28 2018 -0500 @@ -534,19 +534,19 @@ allOptions.add(option); option.execute(); } else { - Log.info("Illegal argument ["+arg+"]"); + Log.error("Illegal argument ["+arg+"]"); } } if (allOptions.isEmpty() || !allOptions.get(0).isMode()) { // first argument should always be a mode. - Log.info("ERROR: Mode is not specified"); + Log.error("ERROR: Mode is not specified"); return false; } if (!hasAppImage && !hasMainJar && !hasMainModule && !hasMainClass && !jreInstaller) { - Log.info("ERROR: Main jar, main class, main module, " + Log.error("ERROR: Main jar, main class, main module, " + "or app-image must be specified."); } else if (!hasMainModule && !hasMainClass) { // try to get main-class from manifest @@ -676,16 +676,16 @@ } catch (ConfigException e) { Log.debug(e); if (e.getAdvice() != null) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("MSG_BundlerConfigException"), bundler.getName(), e.getMessage(), e.getAdvice())); } else { - Log.info(MessageFormat.format(I18N.getString( + Log.error(MessageFormat.format(I18N.getString( "MSG_BundlerConfigExceptionNoAdvice"), bundler.getName(), e.getMessage())); } } catch (RuntimeException re) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("MSG_BundlerRuntimeException"), bundler.getName(), re.toString())); Log.debug(re); @@ -703,7 +703,7 @@ File baseDir = new File(inputdir); if (!baseDir.isDirectory()) { - Log.info( + Log.error( "Unable to add resources: \"-srcdir\" is not a directory."); return; } @@ -719,7 +719,7 @@ files.forEach(file -> fileNames.add( file.getFileName().toString())); } catch (IOException e) { - Log.info("Unable to add resources: " + e.getMessage()); + Log.error("Unable to add resources: " + e.getMessage()); } } fileNames.forEach(file -> deployParams.addResource(baseDir, file)); @@ -772,7 +772,7 @@ try (FileInputStream in = new FileInputStream(file)) { properties.load(in); } catch (IOException e) { - Log.info("Exception: " + e.getMessage()); + Log.error("Exception: " + e.getMessage()); } for (final String name: properties.stringPropertyNames()) { diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/IOUtils.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/IOUtils.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/IOUtils.java Thu Nov 08 10:56:28 2018 -0500 @@ -205,10 +205,8 @@ while ((lineRead = br.readLine()) != null) { if (consumer != null) { consumer.print(lineRead + '\n'); - } else if (verbose) { - Log.info(lineRead); } else { - Log.debug(lineRead); + Log.verbose(lineRead); } } try { diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/JLinkBundlerHelper.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/JLinkBundlerHelper.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/JLinkBundlerHelper.java Thu Nov 08 10:56:28 2018 -0500 @@ -291,7 +291,7 @@ addModules.addAll(platformModules); } - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.modules"), addModules.toString())); AppRuntimeImageBuilder appRuntimeBuilder = new AppRuntimeImageBuilder(); @@ -330,7 +330,7 @@ modulePath, imageBuilder.getPlatformSpecificModulesFile()); addModules.addAll(platformModules); } - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.modules"), addModules.toString())); AppRuntimeImageBuilder appRuntimeBuilder = new AppRuntimeImageBuilder(); @@ -420,9 +420,8 @@ for (String name : modules) { if (validModules.containsKey(name)) { result.add(name); - } - else { - Log.info(MessageFormat.format( + } else { + Log.error(MessageFormat.format( I18N.getString("warning.module.does.not.exist"), name)); } } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/Log.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/Log.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/Log.java Thu Nov 08 10:56:28 2018 -0500 @@ -76,14 +76,6 @@ } } - public void infof(String format, Object... args) { - if (out != null) { - out.printf(format, args); - } else { - System.out.printf(format, args); - } - } - public void error(String msg) { if (err != null) { err.println(msg); @@ -144,12 +136,6 @@ } } - public static void infof(String format, Object... args) { - if (delegate != null) { - delegate.infof(format, args); - } - } - public static void error(String msg) { if (delegate != null) { delegate.error(msg); @@ -188,10 +174,6 @@ } } - public static void debug(RuntimeException re) { - debug((Throwable) re); - } - public static void debug(Throwable t) { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { try (PrintStream ps = new PrintStream(baos)) { diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/StandardBundlerParam.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/StandardBundlerParam.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/StandardBundlerParam.java Thu Nov 08 10:56:28 2018 -0500 @@ -562,9 +562,8 @@ if (javaBasePath == null || !Files.exists(javaBasePath)) { - jdk.jpackager.internal.Log.info( - String.format(I18N.getString( - "warning.no.jdk.modules.found"))); + Log.error(String.format(I18N.getString( + "warning.no.jdk.modules.found"))); } return modulePath; diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/share/classes/jdk/jpackager/internal/builders/AbstractAppImageBuilder.java --- a/src/jdk.jpackager/share/classes/jdk/jpackager/internal/builders/AbstractAppImageBuilder.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/share/classes/jdk/jpackager/internal/builders/AbstractAppImageBuilder.java Thu Nov 08 10:56:28 2018 -0500 @@ -142,7 +142,7 @@ category == null ? "" : "[" + category + "] ", publicName); } if (msg != null) { - Log.info(msg); + Log.verbose(msg); } } return is; diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/windows/classes/jdk/jpackager/internal/builders/windows/WindowsAppImageBuilder.java --- a/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/builders/windows/WindowsAppImageBuilder.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/builders/windows/WindowsAppImageBuilder.java Thu Nov 08 10:56:28 2018 -0500 @@ -124,7 +124,7 @@ params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".ico")) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("message.icon-not-ico"), f)); return null; } @@ -298,8 +298,8 @@ } } catch (IOException ex) { - Log.info("Exception: "+ex); - Log.debug(ex); + Log.error("Exception: "+ex); + Log.verbose(ex); } finally { cleanupConfigFiles(params); } @@ -357,7 +357,7 @@ Map params) { String value = param.fetchFrom(params); if (value.contains("\r") || value.contains("\n")) { - Log.info("Configuration Parameter " + param.getID() + Log.error("Configuration Parameter " + param.getID() + " contains multiple lines of text, ignore it"); data.put(key, ""); return; @@ -435,7 +435,7 @@ // Run tool on launcher file to change the icon and the metadata. try { if (WindowsDefender.isThereAPotentialWindowsDefenderIssue()) { - Log.info(MessageFormat.format(I18N.getString( + Log.error(MessageFormat.format(I18N.getString( "message.potential.windows.defender.issue"), WindowsDefender.getUserTempDirectory())); } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinAppBundler.java --- a/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinAppBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinAppBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -67,7 +67,7 @@ params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".ico")) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( I18N.getString("message.icon-not-ico"), f)); return null; } @@ -181,7 +181,7 @@ appName = appName.substring(0, index); } if (files.length > 1) { - Log.info(MessageFormat.format(I18N.getString( + Log.error(MessageFormat.format(I18N.getString( "message.multiple-launchers"), appName)); } } @@ -219,7 +219,7 @@ outputDirectory.getAbsolutePath())); } if (!dependentTask) { - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.creating-app-bundle"), APP_NAME.fetchFrom(p), outputDirectory.getAbsolutePath())); } @@ -260,13 +260,9 @@ return predefined; } return rootDirectory; - } catch (IOException ex) { - Log.info("Exception: "+ex); - Log.debug(ex); - return null; } catch (Exception ex) { - Log.info("Exception: "+ex); - Log.debug(ex); + Log.error("Exception: "+ex); + Log.verbose(ex); return null; } } @@ -284,19 +280,15 @@ StandardBundlerParam.copyPredefinedRuntimeImage(p, appBuilder); } if (!dependentTask) { - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.result-dir"), outputDirectory.getAbsolutePath())); } return rootDirectory; - } catch (IOException ex) { - Log.info(ex.toString()); + } catch (Exception ex) { + Log.error("Exception: "+ex); Log.verbose(ex); return null; - } catch (Exception ex) { - Log.info("Exception: "+ex); - Log.debug(ex); - return null; } } diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinExeBundler.java --- a/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinExeBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinExeBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -309,7 +309,7 @@ double minVersion = 5.0f; if (innoVersion < minVersion) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( getString("message.tool-wrong-version"), TOOL_INNO_SETUP_COMPILER, innoVersion, minVersion)); throw new ConfigException( @@ -442,7 +442,7 @@ } if (WindowsDefender.isThereAPotentialWindowsDefenderIssue()) { - Log.info(MessageFormat.format( + Log.error(MessageFormat.format( getString("message.potential.windows.defender.issue"), WindowsDefender.getUserTempDirectory())); } @@ -450,8 +450,8 @@ // validate we have valid tools before continuing String iscc = TOOL_INNO_SETUP_COMPILER_EXECUTABLE.fetchFrom(p); if (iscc == null || !new File(iscc).isFile()) { - Log.info(getString("error.iscc-not-found")); - Log.info(MessageFormat.format( + Log.error(getString("error.iscc-not-found")); + Log.error(MessageFormat.format( getString("message.iscc-file-string"), iscc)); return null; } @@ -471,7 +471,7 @@ if (prepareProto(p) && prepareProjectConfig(p)) { File configScript = getConfig_Script(p); if (configScript.exists()) { - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( getString("message.running-wsh-script"), configScript.getAbsolutePath())); IOUtils.run("wscript", configScript, VERBOSE.fetchFrom(p)); @@ -491,7 +491,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(imageDir); } else if (imageDir != null) { - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.debug-working-directory"), imageDir.getAbsolutePath())); } @@ -518,7 +518,7 @@ // limitation of innosetup if (nm.length() > 126) { - Log.info(getString("message-truncating-id")); + Log.error(getString("message-truncating-id")); nm = nm.substring(0, 126); } @@ -659,7 +659,7 @@ } if (extensions == null) { - Log.info(getString( + Log.verbose(getString( "message.creating-association-with-null-extension")); } else { for (String ext : extensions) { @@ -879,7 +879,7 @@ pb = pb.directory(EXE_IMAGE_DIR.fetchFrom(p)); IOUtils.exec(pb, VERBOSE.fetchFrom(p)); - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( getString("message.output-location"), outdir.getAbsolutePath())); diff -r 585939d9f952 -r a828547f7e50 src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinMsiBundler.java --- a/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinMsiBundler.java Mon Nov 05 19:05:15 2018 -0500 +++ b/src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinMsiBundler.java Thu Nov 08 10:56:28 2018 -0500 @@ -545,10 +545,10 @@ String candle = TOOL_CANDLE_EXECUTABLE.fetchFrom(p); if (light == null || !new File(light).isFile() || candle == null || !new File(candle).isFile()) { - Log.info(I18N.getString("error.no-wix-tools")); - Log.info(MessageFormat.format( + Log.error(I18N.getString("error.no-wix-tools")); + Log.verbose(MessageFormat.format( I18N.getString("message.light-file-string"), light)); - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.candle-file-string"), candle)); return null; } @@ -578,7 +578,7 @@ File configScript = new File(imageDir, configScriptSrc.getName()); IOUtils.copyFile(configScriptSrc, configScript); - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.running-wsh-script"), configScript.getAbsolutePath())); IOUtils.run("wscript", @@ -599,7 +599,7 @@ !Log.isDebug()) { IOUtils.deleteRecursive(imageDir); } else if (imageDir != null) { - Log.info(MessageFormat.format( + Log.verbose(MessageFormat.format( I18N.getString("message.debug-working-directory"), imageDir.getAbsolutePath())); } @@ -946,7 +946,7 @@ mimeTypes.isEmpty()) ? null : mimeTypes.get(0); if (extensions == null) { - Log.info(I18N.getString( + Log.verbose(I18N.getString( "message.creating-association-with-null-extension")); String entryName = regName + "File"; @@ -979,7 +979,7 @@ out.println(">"); if (extensions == null) { - Log.info(I18N.getString( + Log.verbose(I18N.getString( "message.creating-association-with-null-extension")); } else { out.print(prefix + "