diff --git a/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java b/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java index 26c3812..6e8e5da 100644 --- a/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java +++ b/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2021 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -107,7 +107,7 @@ public final class StatoolInfosCLI message.appendln(" statoolinfos crawl [ directory | file ]"); message.appendln(" statoolinfos htmlize [ directory | file ]"); - logger.info(message.toString()); + System.out.println(message.toString()); } /** @@ -119,7 +119,7 @@ public final class StatoolInfosCLI message.appendln(BuildInformation.instance().version()); - logger.info(message.toString()); + System.out.println(message.toString()); } /** @@ -227,37 +227,6 @@ public final class StatoolInfosCLI { displayVersion(); } - else if (isMatching(args, "clear", "\\s*.+\\s*")) - { - Files inputs = convertPath(StringUtils.trim(args[1])); - for (File input : inputs) - { - try - { - StatoolInfos.clear(input); - } - catch (Exception exception) - { - logger.error("Error with [{}]: {}", input.getAbsoluteFile(), exception.getMessage()); - } - } - } - else if (isMatching(args, "probe", "\\s*.+\\s*")) - { - Files inputs = convertPath(StringUtils.trim(args[1])); - for (File input : inputs) - { - try - { - StatoolInfos.probe(input); - } - catch (Exception exception) - { - logger.error("Error with [{}]: {}", input.getAbsoluteFile(), exception.getMessage()); - exception.printStackTrace(); - } - } - } else if (isMatching(args, "build", "\\s*.+\\s*")) { Files inputs = convertPath(StringUtils.trim(args[1])); @@ -273,6 +242,21 @@ public final class StatoolInfosCLI } } } + else if (isMatching(args, "clear", "\\s*.+\\s*")) + { + Files inputs = convertPath(StringUtils.trim(args[1])); + for (File input : inputs) + { + try + { + StatoolInfos.clear(input); + } + catch (Exception exception) + { + logger.error("Error with [{}]: {}", input.getAbsoluteFile(), exception.getMessage()); + } + } + } else if (isMatching(args, "crawl", "\\s*.+\\s*")) { Files inputs = convertPath(StringUtils.trim(args[1])); @@ -305,9 +289,25 @@ public final class StatoolInfosCLI } } } + else if (isMatching(args, "probe", "\\s*.+\\s*")) + { + Files inputs = convertPath(StringUtils.trim(args[1])); + for (File input : inputs) + { + try + { + StatoolInfos.probe(input); + } + catch (Exception exception) + { + logger.error("Error with [{}]: {}", input.getAbsoluteFile(), exception.getMessage()); + exception.printStackTrace(); + } + } + } else { - logger.info("Bad usage."); + System.out.println("Bad usage."); displayHelp(); }