Make App logging customizable

This commit is contained in:
James Agnew 2019-02-08 17:14:22 -05:00
parent 37fc432fed
commit 7adb14c754
1 changed files with 5 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public abstract class BaseApp {
private void logAppHeader() {
System.out.flush();
System.out.println("------------------------------------------------------------");
System.out.println("\ud83d\udd25 " + ansi().bold() + " " + provideProductName() + ansi().boldOff() + " " + provideProductVersion() + " - Command Line Tool");
logProductName();
System.out.println("------------------------------------------------------------");
System.out.println("Process ID : " + ManagementFactory.getRuntimeMXBean().getName());
System.out.println("Max configured JVM memory (Xmx) : " + FileHelper.getFileSizeDisplay(Runtime.getRuntime().maxMemory(), 1));
@ -71,6 +71,10 @@ public abstract class BaseApp {
System.out.println("------------------------------------------------------------");
}
protected void logProductName() {
System.out.println("\ud83d\udd25 " + ansi().bold() + " " + provideProductName() + ansi().boldOff() + " " + provideProductVersion() + " - Command Line Tool");
}
private void logCommandUsage(BaseCommand theCommand) {
logAppHeader();