Browse Source

Fixed log.

master
Christian P. MOMON 1 year ago
parent
commit
24698a97c6
2 changed files with 6 additions and 7 deletions
  1. +2
    -2
      log4j.properties
  2. +4
    -5
      src/org/april/agirstatool/cli/AgiStatoolCLI.java

+ 2
- 2
log4j.properties View File

@ -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


+ 4
- 5
src/org/april/agirstatool/cli/AgiStatoolCLI.java View File

@ -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)
{


Loading…
Cancel
Save