qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r800362 - in /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging: RootMessageLogger.java RootMessageLoggerImpl.java actors/AbstractActor.java
Date Mon, 03 Aug 2009 13:23:18 GMT
Author: ritchiem
Date: Mon Aug  3 13:23:18 2009
New Revision: 800362

URL: http://svn.apache.org/viewvc?rev=800362&view=rev
Log:
QPID-2002 : Enable LogActors to log solely about themselves. Situations such as startup would
necesitate this, or when a new connection is being created. The addition of a ConnetionSubject
would be unnecessary.

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLoggerImpl.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java?rev=800362&r1=800361&r2=800362&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java
Mon Aug  3 13:23:18 2009
@@ -37,6 +37,14 @@
      */
     boolean isMessageEnabled(LogActor actor, LogSubject subject);
 
+    /**
+     * Determine if  the LogActor should be generating log messages.
+     *
+     * @param actor   The actor requesting the logging
+     *
+     * @return boolean true if the message should be logged.
+     */
+    boolean isMessageEnabled(LogActor actor);
 
     /**
      * Log the raw message to the configured logger.

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLoggerImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLoggerImpl.java?rev=800362&r1=800361&r2=800362&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLoggerImpl.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/RootMessageLoggerImpl.java
Mon Aug  3 13:23:18 2009
@@ -40,6 +40,11 @@
         return _enabled;
     }
 
+    public boolean isMessageEnabled(LogActor actor)
+    {
+        return _enabled;
+    }
+
     public void rawMessage(String message)
     {
         _rawLogger.rawMessage(MESSAGE + message);

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java?rev=800362&r1=800361&r2=800362&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java
Mon Aug  3 13:23:18 2009
@@ -42,4 +42,13 @@
             _rootLogger.rawMessage(_logString + String.valueOf(subject) + message);
         }
     }
+
+    public void message(LogMessage message)
+    {
+        if (_rootLogger.isMessageEnabled(this))
+        {
+            _rootLogger.rawMessage(_logString + message);
+        }
+    }
+
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message