Skip to content

Commit e492f13

Browse files
committed
redirect output to stderr in order to prevent it getting redirected to files (e.g. citations in TreeAnnotator) #98
1 parent 80c5495 commit e492f13

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/beastfx/app/tools/AppLauncher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,11 @@ public void runAppFromCMD(PackageApp packageApp, String[] additionalArgs) {
312312

313313
Class<?> mainClass = BEASTClassLoader.forName(packageApp.className, "has.main.method");
314314
Method mainMethod = mainClass.getMethod("main", String[].class);
315-
Log.info("About to invoke " + packageApp.className + " " + mainMethod);
315+
Log.warning("About to invoke " + packageApp.className + " " + mainMethod);
316316
if (additionalArgs == null) {
317317
additionalArgs = new String[]{};
318318
}
319-
Log.info("Args:" + Arrays.toString(additionalArgs));
319+
Log.warning("Args:" + Arrays.toString(additionalArgs));
320320

321321
try {
322322
mainMethod.invoke(null, (Object) additionalArgs);
@@ -330,7 +330,7 @@ public void runAppFromCMD(PackageApp packageApp, String[] additionalArgs) {
330330
}
331331
}
332332

333-
Log.info("Done invoking " + packageApp.className);
333+
Log.warning("Done invoking " + packageApp.className);
334334

335335
} catch (Throwable e) {
336336
e.printStackTrace();

src/beastfx/app/treeannotator/TreeAnnotator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -562,19 +562,19 @@ public void run(final int burninPercentage,
562562
String topoCitation = topologySettingService.getCitations();
563563

564564
if (!nodeCitation.isBlank() || !topoCitation.isBlank()) {
565-
System.out.println("======================================================");
566-
System.out.println("Please cite the following when using the summary tree:\n");
565+
Log.warning("======================================================");
566+
Log.warning("Please cite the following when using the summary tree:\n");
567567
if (!nodeCitation.isBlank()) {
568-
System.out.println(nodeCitation);
568+
Log.warning(nodeCitation);
569569
}
570570
// If both citations are present, print a separator line
571571
if (!nodeCitation.isBlank() && !topoCitation.isBlank()) {
572-
System.out.println("\n-----------------------------------------------------\n");
572+
Log.warning("\n-----------------------------------------------------\n");
573573
}
574574
if (!topoCitation.isBlank()) {
575-
System.out.println(topoCitation);
575+
Log.warning(topoCitation);
576576
}
577-
System.out.println("======================================================");
577+
Log.warning("======================================================");
578578

579579
} // Finished printing citations
580580

0 commit comments

Comments
 (0)