You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2017/10/12 20:55:15 UTC

logging-log4j2 git commit: Better error message reporting.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 8b6442442 -> 43fb9e1ef


Better error message reporting.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/43fb9e1e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/43fb9e1e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/43fb9e1e

Branch: refs/heads/master
Commit: 43fb9e1efd521eb6a36f7ce4c2c01eb079264f9c
Parents: 8b64424
Author: Gary Gregory <gg...@apache.org>
Authored: Thu Oct 12 14:55:11 2017 -0600
Committer: Gary Gregory <gg...@apache.org>
Committed: Thu Oct 12 14:55:11 2017 -0600

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/util/CharsetForNameMain.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/43fb9e1e/log4j-api/src/test/java/org/apache/logging/log4j/util/CharsetForNameMain.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/CharsetForNameMain.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/CharsetForNameMain.java
index bd56d95..b82e135 100644
--- a/log4j-api/src/test/java/org/apache/logging/log4j/util/CharsetForNameMain.java
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/CharsetForNameMain.java
@@ -25,12 +25,13 @@ public class CharsetForNameMain {
      * Checks that the given Charset names can be loaded.
      */
     public static void main(String[] args) {
-        for (String charsetName : args) {
+        for (String value : args) {
+            final String charsetName = value.trim();
             if (Charset.isSupported(charsetName)) {
                 Charset cs = Charset.forName(charsetName);
                 System.out.println(String.format("%s -> %s  aliases: %s", charsetName, cs.name(), cs.aliases()));
             } else {
-                System.out.println("Cannot load " + charsetName);
+                System.err.println("Not supported:" + charsetName);
             }
         }
     }