diff --git a/log4j.properties b/log4j.properties index c2869e5..0d928db 100644 --- a/log4j.properties +++ b/log4j.properties @@ -2,9 +2,9 @@ # ################# # priority setting: DEBUG < INFO < WARN < ERROR -log4j.rootLogger = DEBUG, console +log4j.rootLogger = DEBUG, console log4j.logger.org.april.agirstatool = INFO -log4j.logger.fr.devinsy.xidyn = WARN +log4j.logger.fr.devinsy.xidyn = WARN #-- log4j.appender.console = org.apache.log4j.ConsoleAppender diff --git a/src/org/april/agirstatool/cli/AgiStatoolCLI.java b/src/org/april/agirstatool/cli/AgiStatoolCLI.java index 5c38404..498cd91 100644 --- a/src/org/april/agirstatool/cli/AgiStatoolCLI.java +++ b/src/org/april/agirstatool/cli/AgiStatoolCLI.java @@ -128,7 +128,7 @@ public final class AgiStatoolCLI } }); - System.out.println(LocalDateTime.now() + " AgirStatool call: " + new StringList(args).toStringSeparatedBy(" ")); + logger.info("{} AgirStatool call: {}", LocalDateTime.now(), new StringList(args).toStringSeparatedBy(" ")); // logger.info("Single connection opened with [{}].", this.url); @@ -191,7 +191,7 @@ public final class AgiStatoolCLI case "refresh": case "update": { - System.out.println("Update command…"); + logger.info("Update command…"); AgirStatoolConfigFile config = new AgirStatoolConfigFile(configurationFile); Connection connection = SQLUtils.getConnexion(config.getDabataseUrl(), config.getDabataseName(), config.getDabataseLogin(), config.getDabatasePassword()); AgirStatool statool = new AgirStatool(connection, new File(config.getTargetDirectory())); @@ -201,7 +201,7 @@ public final class AgiStatoolCLI case "projects": { - System.out.println("projects command…"); + logger.info("projects command…"); AgirStatoolConfigFile config = new AgirStatoolConfigFile(configurationFile); Connection connection = SQLUtils.getConnexion(config.getDabataseUrl(), config.getDabataseName(), config.getDabataseLogin(), config.getDabatasePassword()); AgirStatool statool = new AgirStatool(connection, new File(config.getTargetDirectory())); @@ -212,7 +212,7 @@ public final class AgiStatoolCLI case "projects+": { - System.out.println("projects+ command…"); + logger.info("projects+ command…"); AgirStatoolConfigFile config = new AgirStatoolConfigFile(configurationFile); Connection connection = SQLUtils.getConnexion(config.getDabataseUrl(), config.getDabataseName(), config.getDabataseLogin(), config.getDabatasePassword()); AgirStatool statool = new AgirStatool(connection, new File(config.getTargetDirectory())); @@ -238,7 +238,6 @@ public final class AgiStatoolCLI } logger.info("Finished."); - System.out.println("Finished."); } catch (AgirStatoolException exception) {