mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-16 18:05:19 +00:00
Make App logging customizable
This commit is contained in:
parent
37fc432fed
commit
7adb14c754
@ -63,7 +63,7 @@ public abstract class BaseApp {
|
|||||||
private void logAppHeader() {
|
private void logAppHeader() {
|
||||||
System.out.flush();
|
System.out.flush();
|
||||||
System.out.println("------------------------------------------------------------");
|
System.out.println("------------------------------------------------------------");
|
||||||
System.out.println("\ud83d\udd25 " + ansi().bold() + " " + provideProductName() + ansi().boldOff() + " " + provideProductVersion() + " - Command Line Tool");
|
logProductName();
|
||||||
System.out.println("------------------------------------------------------------");
|
System.out.println("------------------------------------------------------------");
|
||||||
System.out.println("Process ID : " + ManagementFactory.getRuntimeMXBean().getName());
|
System.out.println("Process ID : " + ManagementFactory.getRuntimeMXBean().getName());
|
||||||
System.out.println("Max configured JVM memory (Xmx) : " + FileHelper.getFileSizeDisplay(Runtime.getRuntime().maxMemory(), 1));
|
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("------------------------------------------------------------");
|
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) {
|
private void logCommandUsage(BaseCommand theCommand) {
|
||||||
logAppHeader();
|
logAppHeader();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user