diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java index d02c5e992b4..d0462dd1330 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hbase.util; +import java.io.PrintStream; import java.io.PrintWriter; import org.apache.commons.logging.Log; @@ -113,6 +114,12 @@ public class VersionInfo { } } + public static void writeTo(PrintStream out) { + for (String line : versionReport()) { + out.println(line); + } + } + public static void logVersion() { for (String line : versionReport()) { LOG.info(line); @@ -120,6 +127,6 @@ public class VersionInfo { } public static void main(String[] args) { - logVersion(); + writeTo(System.out); } }