Skip to content

Commit

Permalink
fix citations output file name
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyBaele committed May 15, 2024
1 parent 581f665 commit 263b967
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/dr/app/beast/BeastMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ public boolean isLoggable(LogRecord record) {
});
infoLogger.addHandler(errorHandler);

/*if (System.getProperty("citations.filename") != null) {
FileOutputStream citationStream = new FileOutputStream(System.getProperty("citations.filename"));
Handler citationHandler = new MessageLogHandler(citationStream);
Logger.getLogger("dr.apps.beast").addHandler(citationHandler);
}*/
FileOutputStream citationStream = new FileOutputStream("citations.txt");
FileOutputStream citationStream = null;
if (System.getProperty("citations.filename") != null) {
citationStream = new FileOutputStream(System.getProperty("citations.filename"));

} else {
citationStream = new FileOutputStream(fileName.substring(0, fileName.toLowerCase().indexOf(".xml")) + ".txt");
}
Handler citationHandler = new MessageLogHandler(citationStream);
Logger.getLogger("dr.app.beast").addHandler(citationHandler);

Expand Down

0 comments on commit 263b967

Please sign in to comment.