Adding more meta information about the user to the GATK logging output, per Tim F's request.
This commit is contained in:
parent
c86e36c909
commit
851ec67bdc
|
|
@ -30,6 +30,7 @@ import org.broadinstitute.sting.commandline.*;
|
||||||
import org.broadinstitute.sting.utils.Utils;
|
import org.broadinstitute.sting.utils.Utils;
|
||||||
import org.broadinstitute.sting.utils.text.TextFormattingUtils;
|
import org.broadinstitute.sting.utils.text.TextFormattingUtils;
|
||||||
|
|
||||||
|
import java.net.InetAddress;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -295,6 +296,7 @@ public class HelpFormatter {
|
||||||
String output = sourceName + " Args: " + entry.getValue().getDescription();
|
String output = sourceName + " Args: " + entry.getValue().getDescription();
|
||||||
logger.info(output);
|
logger.info(output);
|
||||||
}
|
}
|
||||||
|
logger.info(generateUserHelpData());
|
||||||
logger.info("Date/Time: " + dateFormat.format(date));
|
logger.info("Date/Time: " + dateFormat.format(date));
|
||||||
logger.info(barrier);
|
logger.info(barrier);
|
||||||
|
|
||||||
|
|
@ -303,6 +305,23 @@ public class HelpFormatter {
|
||||||
logger.info(barrier);
|
logger.info(barrier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the user-related help information.
|
||||||
|
* @return a non-null, non-empty String with the relevant information.
|
||||||
|
*/
|
||||||
|
private static String generateUserHelpData() {
|
||||||
|
try {
|
||||||
|
return "Executing as " +
|
||||||
|
System.getProperty("user.name") + "@" + InetAddress.getLocalHost().getHostName() +
|
||||||
|
" on " + System.getProperty("os.name") + " " + System.getProperty("os.version") +
|
||||||
|
" " + System.getProperty("os.arch") + "; " + System.getProperty("java.vm.name") +
|
||||||
|
" " + System.getProperty("java.runtime.version") + ".";
|
||||||
|
} catch (Exception e) {
|
||||||
|
// don't fail
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a barrier to use to distinguish the header from the rest of the output.
|
* Create a barrier to use to distinguish the header from the rest of the output.
|
||||||
* @param text A collection of lines to output as part of a header.
|
* @param text A collection of lines to output as part of a header.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue