diff --git a/src/main/java/org/globalbioticinteractions/elton/cmd/CmdCheck.java b/src/main/java/org/globalbioticinteractions/elton/cmd/CmdCheck.java index ac9fa04..8162f19 100644 --- a/src/main/java/org/globalbioticinteractions/elton/cmd/CmdCheck.java +++ b/src/main/java/org/globalbioticinteractions/elton/cmd/CmdCheck.java @@ -17,6 +17,7 @@ import org.eol.globi.service.DatasetFinder; import org.eol.globi.service.DatasetFinderGitHubArchiveMaster; import org.eol.globi.service.DatasetFinderProxy; +import org.eol.globi.util.CSVTSVUtil; import org.globalbioticinteractions.elton.util.NodeFactoryNull; import org.globalbioticinteractions.elton.util.SpecimenNull; @@ -77,7 +78,7 @@ private void addUntilFull(String message, Set msgs) { } String msgForRepo(String message) { - return "[" + repoName + "]: [" + message + "]"; + return repoName + "\t" + message; } }); @@ -87,10 +88,11 @@ String msgForRepo(String message) { throw new StudyImporterException(getResultMsg(repoName, warnings, errors) + ", please check your log."); } } finally { - infos.forEach(LOG::info); - warnings.forEach(LOG::warn); - errors.forEach(LOG::error); - System.out.println("\n" + getResultMsg(repoName, warnings, errors)); + infos.forEach(System.out::println); + warnings.forEach(System.out::println); + errors.forEach(System.out::println); + System.out.println(repoName + "\t" + errors.size() + " error(s)"); + System.out.println(repoName + "\t" + warnings.size() + " warning(s)"); } } @@ -111,10 +113,10 @@ private static class NodeFactoryLogging extends NodeFactoryNull { @Override public void interactsWith(Specimen target, InteractType type, Location centroid) { if (counter.get() > 0 && counter.get() % 1000 == 0) { - System.out.println(); + System.err.println(); } if (counter.get() % 10 == 0) { - System.out.print("."); + System.err.print("."); } counter.getAndIncrement(); } diff --git a/src/main/java/org/globalbioticinteractions/elton/cmd/CmdLine.java b/src/main/java/org/globalbioticinteractions/elton/cmd/CmdLine.java index 5a9d5d2..8f6f854 100644 --- a/src/main/java/org/globalbioticinteractions/elton/cmd/CmdLine.java +++ b/src/main/java/org/globalbioticinteractions/elton/cmd/CmdLine.java @@ -27,9 +27,6 @@ public static void run(String[] args) throws Throwable { CmdLine.run(jc.getCommands().get(jc.getParsedCommand())); } catch (Throwable ex) { LOG.error("unexpected exception", ex); - StringBuilder out = new StringBuilder(); - jc.usage(out); - System.err.append(out.toString()); throw ex; } } diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties index 0359ecf..da58183 100644 --- a/src/main/resources/log4j.properties +++ b/src/main/resources/log4j.properties @@ -7,5 +7,4 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.err log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -# Print the date in ISO 8601 format -log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n \ No newline at end of file +log4j.appender.stdout.layout.ConversionPattern=%m%n \ No newline at end of file