Improve logging
[cc0/argeo-build.git] / src / org / argeo / build / Make.java
index 9ebbfd462f10c8f0052c065b0c19e871ba1cbdb8..376a66db42e01abd4990bc515e1850d29f40be99 100644 (file)
@@ -309,10 +309,10 @@ public class Make {
                }
                CompletableFuture.allOf(toDos.toArray(new CompletableFuture[toDos.size()])).join();
                long duration = System.currentTimeMillis() - begin;
-               logger.log(INFO, "Packaging took " + duration + " ms");
+               logger.log(DEBUG, "Packaging took " + duration + " ms");
        }
 
-       /** Install the bundles. */
+       /** Install or uninstall bundles and native output. */
        void install(Map<String, List<String>> options, boolean uninstall) throws IOException {
                // check arguments
                List<String> bundles = options.get("--bundles");
@@ -329,9 +329,9 @@ public class Make {
                List<String> targetDirs = options.get("--target");
                Objects.requireNonNull(targetDirs, "--target argument must be set");
                if (targetDirs.size() != 1)
-                       throw new IllegalArgumentException("One and only one --target must be specified");
+                       throw new IllegalArgumentException("Only one --target must be specified");
                Path targetA2 = Paths.get(targetDirs.get(0));
-               logger.log(INFO, (uninstall ? "Uninstalling from " : "Installing to ") + targetA2);
+               logger.log(INFO, (uninstall ? "Uninstalling bundles from " : "Installing bundles to ") + targetA2);
 
                final String branch;
                Path branchMk = sdkSrcBase.resolve(BRANCH_MK);
@@ -729,8 +729,8 @@ public class Make {
                        }
 
                        long jvmUptime = ManagementFactory.getRuntimeMXBean().getUptime();
-                       logger.log(INFO, "Make.java action '" + action + "' succesfully completed after " + (jvmUptime / 1000) + "."
-                                       + (jvmUptime % 1000) + " s");
+                       logger.log(INFO, "Make.java action '" + action + "' successfully completed after " + (jvmUptime / 1000)
+                                       + "." + (jvmUptime % 1000) + " s");
                } catch (Exception e) {
                        long jvmUptime = ManagementFactory.getRuntimeMXBean().getUptime();
                        logger.log(ERROR, "Make.java action '" + action + "' failed after " + (jvmUptime / 1000) + "."