qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1697229 - in /qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging: AbstractNameAndLevelFilter.java QpidLoggerTurboFilter.java
Date Sun, 23 Aug 2015 17:34:43 GMT
Author: kwall
Date: Sun Aug 23 17:34:42 2015
New Revision: 1697229

URL: http://svn.apache.org/r1697229
Log:
QPID-6708: [Java Broker] Make a change in level on an existing LevelFilter notify the turbo
filter so it may invalidate its cache

Modified:
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/AbstractNameAndLevelFilter.java
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/QpidLoggerTurboFilter.java

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/AbstractNameAndLevelFilter.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/AbstractNameAndLevelFilter.java?rev=1697229&r1=1697228&r2=1697229&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/AbstractNameAndLevelFilter.java
(original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/AbstractNameAndLevelFilter.java
Sun Aug 23 17:34:42 2015
@@ -53,6 +53,7 @@ public abstract class AbstractNameAndLev
         if (_filter != null)
         {
             _filter.setLevel(Level.toLevel(getLevel().name()));
+            QpidLoggerTurboFilter.filterChangedOnRootContext(_filter);
         }
     }
 

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/QpidLoggerTurboFilter.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/QpidLoggerTurboFilter.java?rev=1697229&r1=1697228&r2=1697229&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/QpidLoggerTurboFilter.java
(original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/QpidLoggerTurboFilter.java
Sun Aug 23 17:34:42 2015
@@ -96,6 +96,14 @@ public final class QpidLoggerTurboFilter
         }
     }
 
+    public void filterChanged(EffectiveLevelFilter filter)
+    {
+        if(_filters.contains(filter))
+        {
+            clearCachedResults();
+        }
+    }
+
     @Override
     public boolean equals(final Object o)
     {
@@ -159,6 +167,12 @@ public final class QpidLoggerTurboFilter
         turboFilter.filterRemoved(filter);
     }
 
+    private static void filterChanged(final EffectiveLevelFilter filter, final LoggerContext
context)
+    {
+        QpidLoggerTurboFilter turboFilter = installIfNecessary(context);
+        turboFilter.filterChanged(filter);
+    }
+
     public static void filterAddedToRootContext(EffectiveLevelFilter filter)
     {
         filterAdded(filter, getRootContext());
@@ -169,4 +183,9 @@ public final class QpidLoggerTurboFilter
         filterRemoved(filter, getRootContext());
     }
 
+    public static void filterChangedOnRootContext(final EffectiveLevelFilter filter)
+    {
+        filterChanged(filter, getRootContext());
+    }
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message