Repository: groovy
Updated Branches:
  refs/heads/master 0e0ea4c95 -> bc7d339fe


GROOVY-7831: bump logging dependency versions


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/bc7d339f
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/bc7d339f
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/bc7d339f

Branch: refs/heads/master
Commit: bc7d339feb4f61b96aa6bb796937d1b67672e89d
Parents: 0e0ea4c
Author: Paul King <pa...@asert.com.au>
Authored: Fri Apr 29 20:26:10 2016 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Fri Apr 29 20:26:10 2016 +1000

----------------------------------------------------------------------
 build.gradle                                   |  6 +++---
 src/test/groovy/util/logging/Log4j2Test.groovy | 15 +++++++++++++--
 2 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/bc7d339f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index ead0cdf..93a5d5d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -142,14 +142,14 @@ ext {
     jarjarVersion = '1.3'
     jlineVersion = '2.14.1'
     jmockVersion = '1.2.0'
-    logbackVersion = '1.1.6'
+    logbackVersion = '1.1.7'
     log4jVersion = '1.2.17'
-    log4j2Version = '2.3'
+    log4j2Version = '2.5'
     luceneVersion = '4.7.2'
     openbeansVersion = '1.0'
     openejbVersion = '1.0'
     qdoxVersion = '1.12.1'
-    slf4jVersion = '1.7.19'
+    slf4jVersion = '1.7.21'
     xmlunitVersion = '1.6'
     xstreamVersion = '1.4.9'
     spockVersion = '1.0-groovy-2.4'

http://git-wip-us.apache.org/repos/asf/groovy/blob/bc7d339f/src/test/groovy/util/logging/Log4j2Test.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/util/logging/Log4j2Test.groovy 
b/src/test/groovy/util/logging/Log4j2Test.groovy
index 5ae6fe4..db4e23d 100644
--- a/src/test/groovy/util/logging/Log4j2Test.groovy
+++ b/src/test/groovy/util/logging/Log4j2Test.groovy
@@ -56,13 +56,24 @@ class Log4j2Test extends GroovyTestCase {
     protected void setUp() {
         super.setUp()
 
-        PatternLayout layout = PatternLayout.createLayout('%m', null, null, 
Charset.forName('UTF-8'), true, false, '', '')
+        PatternLayout layout = createLayout('%m', Charset.forName('UTF-8'))
         appender = new Log4j2InterceptingAppender('MyAppender', null, layout)
         logger = LogManager.getLogger('MyClass')
         logger.addAppender(appender)
         logger.setLevel(Level.ALL)
     }
 
+    private static PatternLayout createLayout(String pattern, Charset charset) 
{
+        return PatternLayout.newBuilder()
+                .withPattern(pattern)
+                .withCharset(charset)
+                .withAlwaysWriteExceptions(true)
+                .withNoConsoleNoAnsi(false)
+                .withHeader('')
+                .withFooter('')
+                .build();
+    }
+
     protected void tearDown() {
         super.tearDown()
         logger.removeAppender(appender)
@@ -236,7 +247,7 @@ class Log4j2Test extends GroovyTestCase {
     }
 
     void testCustomCategory() {
-        PatternLayout layout = PatternLayout.createLayout('%m', null, null, 
Charset.forName('UTF-8'), true, false, '', '')
+        PatternLayout layout = createLayout('%m', Charset.forName('UTF-8'))
         Log4j2InterceptingAppender appenderForCustomCategory = new 
Log4j2InterceptingAppender('Appender4CustomCategory', null, layout)
         def loggerForCustomCategory = LogManager.getLogger('customCategory')
         loggerForCustomCategory.addAppender(appenderForCustomCategory)

Reply via email to