You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/09/08 14:53:32 UTC

[32/35] logging-log4j2 git commit: Parameterize INDENT

Parameterize INDENT


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

Branch: refs/heads/LOG4J2-1349-gcfree-threadcontext
Commit: 03cc422fcb2442b574842b082d97569b1d4d1fee
Parents: d41183a
Author: Mikael St�ldal <mi...@magine.com>
Authored: Thu Sep 8 11:01:15 2016 +0200
Committer: Mikael St�ldal <mi...@magine.com>
Committed: Thu Sep 8 11:01:15 2016 +0200

----------------------------------------------------------------------
 .../builder/ConfigurationBuilderTest.java       | 49 ++++++++++----------
 1 file changed, 25 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/03cc422f/log4j-core/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java
index c465393..d6f3b89 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java
@@ -30,6 +30,7 @@ import static org.junit.Assume.assumeTrue;
 
 public class ConfigurationBuilderTest {
 
+    private static final String INDENT = "\t";
     private static final String EOL = System.lineSeparator();
 
     private void addTestFixtures(final String name, final ConfigurationBuilder<BuiltConfiguration> builder) {
@@ -56,30 +57,30 @@ public class ConfigurationBuilderTest {
     private final static String expectedXml =
             "<?xml version='1.0' encoding='UTF-8'?>" + EOL +
             "<Configuration name=\"config name\" status=\"ERROR\" packages=\"foo,bar\">" + EOL +
-            "\t<Properties>" + EOL +
-            "\t\t<Property name=\"MyKey\">MyValue</Property>" + EOL +
-            "\t</Properties>" + EOL +
-            "\t<Scripts>" + EOL +
-            "\t\t<ScriptFile name=\"target/test-classes/scripts/filter.groovy\" path=\"target/test-classes/scripts/filter.groovy\" isWatched=\"true\"/>" + EOL +
-            "\t</Scripts>" + EOL +
-            "\t<CustomLevels>" + EOL +
-            "\t\t<CustomLevel name=\"Panic\" intLevel=\"17\"/>" + EOL +
-            "\t</CustomLevels>" + EOL +
-            "\t<ThresholdFilter onMatch=\"ACCEPT\" onMisMatch=\"NEUTRAL\" level=\"DEBUG\"/>" + EOL +
-            "\t<Appenders>" + EOL +
-            "\t\t<CONSOLE name=\"Stdout\" target=\"SYSTEM_OUT\">" + EOL +
-            "\t\t\t<PatternLayout pattern=\"%d [%t] %-5level: %msg%n%throwable\"/>" + EOL +
-            "\t\t\t<MarkerFilter onMatch=\"DENY\" onMisMatch=\"NEUTRAL\" marker=\"FLOW\"/>" + EOL +
-            "\t\t</CONSOLE>" + EOL +
-            "\t</Appenders>" + EOL +
-            "\t<Loggers>" + EOL +
-            "\t\t<Logger name=\"org.apache.logging.log4j\" level=\"DEBUG\" includeLocation=\"true\" additivity=\"false\">" + EOL +
-            "\t\t\t<AppenderRef ref=\"Stdout\"/>" + EOL +
-            "\t\t</Logger>" + EOL +
-            "\t\t<Root level=\"ERROR\">" + EOL +
-            "\t\t\t<AppenderRef ref=\"Stdout\"/>" + EOL +
-            "\t\t</Root>" + EOL +
-            "\t</Loggers>" + EOL +
+                INDENT + "<Properties>" + EOL +
+                INDENT + INDENT + "<Property name=\"MyKey\">MyValue</Property>" + EOL +
+                INDENT + "</Properties>" + EOL +
+                INDENT + "<Scripts>" + EOL +
+                INDENT + INDENT + "<ScriptFile name=\"target/test-classes/scripts/filter.groovy\" path=\"target/test-classes/scripts/filter.groovy\" isWatched=\"true\"/>" + EOL +
+                INDENT + "</Scripts>" + EOL +
+                INDENT + "<CustomLevels>" + EOL +
+                INDENT + INDENT + "<CustomLevel name=\"Panic\" intLevel=\"17\"/>" + EOL +
+                INDENT + "</CustomLevels>" + EOL +
+                INDENT + "<ThresholdFilter onMatch=\"ACCEPT\" onMisMatch=\"NEUTRAL\" level=\"DEBUG\"/>" + EOL +
+                INDENT + "<Appenders>" + EOL +
+                INDENT + INDENT + "<CONSOLE name=\"Stdout\" target=\"SYSTEM_OUT\">" + EOL +
+                INDENT + INDENT + INDENT + "<PatternLayout pattern=\"%d [%t] %-5level: %msg%n%throwable\"/>" + EOL +
+                INDENT + INDENT + INDENT + "<MarkerFilter onMatch=\"DENY\" onMisMatch=\"NEUTRAL\" marker=\"FLOW\"/>" + EOL +
+                INDENT + INDENT + "</CONSOLE>" + EOL +
+                INDENT + "</Appenders>" + EOL +
+                INDENT + "<Loggers>" + EOL +
+                INDENT + INDENT + "<Logger name=\"org.apache.logging.log4j\" level=\"DEBUG\" includeLocation=\"true\" additivity=\"false\">" + EOL +
+                INDENT + INDENT + INDENT + "<AppenderRef ref=\"Stdout\"/>" + EOL +
+                INDENT + INDENT + "</Logger>" + EOL +
+                INDENT + INDENT + "<Root level=\"ERROR\">" + EOL +
+                INDENT + INDENT + INDENT + "<AppenderRef ref=\"Stdout\"/>" + EOL +
+                INDENT + INDENT + "</Root>" + EOL +
+                INDENT + "</Loggers>" + EOL +
             "</Configuration>" + EOL;
 
     // TODO make test run properly on Windows