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 2014/06/25 19:04:58 UTC
svn commit: r1605502 -
/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
Author: ggregory
Date: Wed Jun 25 17:04:57 2014
New Revision: 1605502
URL: http://svn.apache.org/r1605502
Log:
Remove duplicate code.
Modified:
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java?rev=1605502&r1=1605501&r2=1605502&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java Wed Jun 25 17:04:57 2014
@@ -151,7 +151,6 @@ public class PatternLayoutTest {
@Test
public void testRegex() throws Exception {
- final LoggerContext ctx = (LoggerContext) LogManager.getContext();
final PatternLayout layout = PatternLayout.newBuilder()
.withPattern(regexPattern)
.withConfiguration(ctx.getConfiguration())
@@ -163,7 +162,6 @@ public class PatternLayoutTest {
}
private void testUnixTime(final String pattern) throws Exception {
- final LoggerContext ctx = (LoggerContext) LogManager.getContext();
final PatternLayout layout = PatternLayout.newBuilder()
.withPattern(pattern + " %m")
.withConfiguration(ctx.getConfiguration())
@@ -182,7 +180,6 @@ public class PatternLayoutTest {
@Test
public void testUnixTime() throws Exception {
- final LoggerContext ctx = (LoggerContext) LogManager.getContext();
final PatternLayout layout = PatternLayout.newBuilder()
.withPattern("%d{UNIX} %m")
.withConfiguration(ctx.getConfiguration())
@@ -201,7 +198,6 @@ public class PatternLayoutTest {
@Test
public void testUnixTimeMillis() throws Exception {
- final LoggerContext ctx = (LoggerContext) LogManager.getContext();
final PatternLayout layout = PatternLayout.newBuilder()
.withPattern("%d{UNIX_MILLIS} %m")
.withConfiguration(ctx.getConfiguration())
@@ -220,7 +216,6 @@ public class PatternLayoutTest {
@Test
public void testHeaderFooter() throws Exception {
- final LoggerContext ctx = (LoggerContext) LogManager.getContext();
final PatternLayout layout = PatternLayout.newBuilder()
.withPattern("%d{UNIX} %m")
.withConfiguration(ctx.getConfiguration())
@@ -238,7 +233,6 @@ public class PatternLayoutTest {
@Test
public void testSpecialChars() throws Exception {
- final LoggerContext ctx = (LoggerContext) LogManager.getContext();
final PatternLayout layout = PatternLayout.newBuilder()
.withPattern("\\\\%level\\t%msg\\n\\t%logger\\r\\n\\f")
.withConfiguration(ctx.getConfiguration())