[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.29-25-g513fb2d

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Mon Sep 19 12:00:16 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".

The branch, master has been updated
       via  513fb2d00fecf03dc8bc561f9cdc2e49bc0d80df (commit)
      from  75da45d0f69a3877de3b3ab669c50ea6837ec996 (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=513fb2d00fecf03dc8bc561f9cdc2e49bc0d80df
http://github.com/ceki/logback/commit/513fb2d00fecf03dc8bc561f9cdc2e49bc0d80df

commit 513fb2d00fecf03dc8bc561f9cdc2e49bc0d80df
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Mon Sep 19 11:58:15 2011 +0200

    The getMDC method is deprecated and replaced by getMDCPropertyMap.

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java b/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java
index 6b6b213..2fa8a1f 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/sift/MDCBasedDiscriminator.java
@@ -47,7 +47,7 @@ public class MDCBasedDiscriminator extends ContextAwareBase implements
    */
   public String getDiscriminatingValue(ILoggingEvent event) {
     // http://jira.qos.ch/browse/LBCLASSIC-213
-    Map<String, String> mdcMap = event.getMdc();
+    Map<String, String> mdcMap = event.getMDCPropertyMap();
     if (mdcMap == null) {
       return defaultValue;
     }
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/spi/ILoggingEvent.java b/logback-classic/src/main/java/ch/qos/logback/classic/spi/ILoggingEvent.java
index c5bd822..4b169bd 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/spi/ILoggingEvent.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/spi/ILoggingEvent.java
@@ -76,6 +76,7 @@ public interface ILoggingEvent extends DeferredProcessingAware {
 
   /**
    * Synonym for [@link #getMDCPropertyMap}.
+   * @deprecated  Replaced by [@link #getMDCPropertyMap}
    */
   public Map<String, String> getMdc();
   public long getTimeStamp();
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java b/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java
index 05fac34..c2a0e1b 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java
@@ -312,6 +312,10 @@ public class LoggingEvent implements ILoggingEvent {
     return mdcPropertyMap;
   }
 
+  /**
+   * Synonym for [@link #getMDCPropertyMap}.
+   * @deprecated  Replaced by [@link #getMDCPropertyMap}
+   */
   public Map<String, String> getMdc() {
     return mdcPropertyMap;
   }
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/util/LogbackMDCAdapter.java b/logback-classic/src/main/java/ch/qos/logback/classic/util/LogbackMDCAdapter.java
index fcc4d9b..4d494e9 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/util/LogbackMDCAdapter.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/util/LogbackMDCAdapter.java
@@ -37,6 +37,13 @@ import org.slf4j.spi.MDCAdapter;
  */
 public final class LogbackMDCAdapter implements MDCAdapter {
 
+  // We wish to avoid unnecessarily copying of the map. To ensure
+  // efficient/timely copying, we have a variable keeping track of the last
+  // operation. A copy is necessary on 'put' or 'remove' but only if the last
+  // operation was a 'get'. Get operations never necessitate a copy nor
+  // successive 'put/remove' operations, only a get followed by a 'put/remove'
+  // requires copying the map.
+  // See http://jira.qos.ch/browse/LBCLASSIC-254 for the original discussion.
 
   // We no longer use CopyOnInheritThreadLocal in order to solve LBCLASSIC-183
   // Initially the contents of the thread local in parent and child threads
@@ -170,6 +177,9 @@ public final class LogbackMDCAdapter implements MDCAdapter {
    * null.
    */
   public Map getCopyOfContextMap() {
+    // why aren't we setting lastOperation as follows?
+    // lastOperation.set(READ_OPERATION);
+
     HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
     if (hashMap == null) {
       return null;
diff --git a/logback-core/src/main/java/ch/qos/logback/core/util/Loader.java b/logback-core/src/main/java/ch/qos/logback/core/util/Loader.java
index feade42..d9eb252 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/util/Loader.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/util/Loader.java
@@ -138,7 +138,7 @@ public class Loader {
   }
 
   /**
-   * Returns the class loader of clazz if
+   * Returns the class loader of clazz in an access privileged section.
    * @param clazz
    * @return
    */
diff --git a/logback-site/src/site/pages/news.html b/logback-site/src/site/pages/news.html
index 713ea7b..97ae9ad 100644
--- a/logback-site/src/site/pages/news.html
+++ b/logback-site/src/site/pages/news.html
@@ -28,7 +28,21 @@
 
     <hr width="80%" align="center" />
 
-    <h3>July xxx, 2011 - Release of version 0.9.30</h3>
+    <h3>September xxx, 2011 - Release of version 0.9.30</h3>
+
+
+    <p>Archive removal can now deal with prolonged periods of
+    application inactivity and application stop and restarts. The
+    issue is described in <a
+    href="http://jira.qos.ch/browse/LBCORE-147">LBCORE-147</a>
+    reported by Rafael Diaz Maurin.
+    </p>
+
+    <p>In the <code>ILoggingEvent</code> interface the
+    <code>getMDC</code> method is now deprecated and replaced by
+    <code>getMDCPropertyMap</code>. The latter methof was already part
+    of the <code>ILoggingEvent</code> interface in prior versions of
+    logback-classic.</p>
 
     <p>It is now possible to specify multiple destination addresses
     separated by commas in the the <span class="option">to</span>

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

Summary of changes:
 .../classic/sift/MDCBasedDiscriminator.java        |    2 +-
 .../ch/qos/logback/classic/spi/ILoggingEvent.java  |    1 +
 .../ch/qos/logback/classic/spi/LoggingEvent.java   |    4 ++++
 .../logback/classic/util/LogbackMDCAdapter.java    |   10 ++++++++++
 .../main/java/ch/qos/logback/core/util/Loader.java |    2 +-
 logback-site/src/site/pages/news.html              |   16 +++++++++++++++-
 6 files changed, 32 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list