From 7adb14c754d28d6a7f048cde6dc9c2dc73f1e0e8 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Fri, 8 Feb 2019 17:14:22 -0500 Subject: [PATCH] Make App logging customizable --- .../src/main/java/ca/uhn/fhir/cli/BaseApp.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java index 9300211a49a..f554da5da97 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java @@ -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();