The branch, master has been updated
       via  bfb1e735c93af7672bb96511c68ac1a379f6eadc (commit)
      from  feba37d06ec4fc8398641b3056f32e1afdcb0bb4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=bfb1e735c93af7672bb96511c68ac1a379f6eadc
http://github.com/ceki/logback/commit/bfb1e735c93af7672bb96511c68ac1a379f6eadc

commit bfb1e735c93af7672bb96511c68ac1a379f6eadc
Author: Ceki Gulcu <[email protected]>
Date:   Fri Nov 13 10:59:50 2009 +0100

    Fixed http://jira.qos.ch/browse/LBCLASSIC-149

diff --git 
a/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ContextNameConverter.java
 
b/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ContextNameConverter.java
index 56bfe15..29a3d29 100644
--- 
a/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ContextNameConverter.java
+++ 
b/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ContextNameConverter.java
@@ -26,7 +26,7 @@ public class ContextNameConverter extends ClassicConverter {
    * Return the name of the logger context's name.
    */
   public String convert(ILoggingEvent event) {
-    return getContext().getName();
+    return event.getLoggerContextVO().getName();
   }
 
 }
diff --git 
a/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
 
b/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
index c1ff3b5..c4c5b3b 100644
--- 
a/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
+++ 
b/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
@@ -356,7 +356,11 @@ public class ConverterTest {
   @Test
   public void contextNameConverter() {
     ClassicConverter converter = new ContextNameConverter();
-    converter.setContext(lc);
+    // see http://jira.qos.ch/browse/LBCLASSIC-149
+    LoggerContext lcOther = new LoggerContext();
+    lcOther.setName("another");
+    converter.setContext(lcOther);
+    
     lc.setName("aValue");
     ILoggingEvent event = makeLoggingEvent(null);
 
diff --git a/logback-site/src/site/pages/news.html 
b/logback-site/src/site/pages/news.html
index 953aabe..95af9a3 100644
--- a/logback-site/src/site/pages/news.html
+++ b/logback-site/src/site/pages/news.html
@@ -63,6 +63,12 @@
     showed that this was an appropriate strategy in all the cases we
     considered.</p>
 
+    <p>Fixed <a
+    href="http://jira.qos.ch/browse/LBCLASSIC-149";>LBCLASSIC-149</a>. The
+    ContextNameConverter now correctly uses the context name of the
+    event instead of its own context name.
+    </p>
+
     <hr width="80%" align="center" />
 
     <h3>9th of August 2009 - Release of version 0.9.17</h3>

-----------------------------------------------------------------------

Summary of changes:
 .../classic/pattern/ContextNameConverter.java      |    2 +-
 .../qos/logback/classic/pattern/ConverterTest.java |    6 +++++-
 logback-site/src/site/pages/news.html              |    6 ++++++
 3 files changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev

Reply via email to