You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2016/12/14 10:58:23 UTC

svn commit: r1774167 - /qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/LoggingFilter.java

Author: orudyy
Date: Wed Dec 14 10:58:23 2016
New Revision: 1774167

URL: http://svn.apache.org/viewvc?rev=1774167&view=rev
Log:
QPID-7549: Remove username from log messages in LoggingFilter since now it is always null

Modified:
    qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/LoggingFilter.java

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/LoggingFilter.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/LoggingFilter.java?rev=1774167&r1=1774166&r2=1774167&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/LoggingFilter.java (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/LoggingFilter.java Wed Dec 14 10:58:23 2016
@@ -51,14 +51,12 @@ public class LoggingFilter implements Fi
         HttpServletRequest httpRequest = (HttpServletRequest) request;
         HttpServletResponse httpResponse = (HttpServletResponse) response;
         String method = null;
-        String user = null;
         String url = null;
         if (LOGGER.isDebugEnabled())
         {
             method = httpRequest.getMethod();
-            user = HttpManagementUtil.getRequestPrincipals(httpRequest);
             url = HttpManagementUtil.getRequestURL(httpRequest);
-            LOGGER.debug("REQUEST  user='{}' method='{}' url='{}'", user, method, url);
+            LOGGER.debug("REQUEST  method='{}' url='{}'", method, url);
         }
         try
         {
@@ -68,15 +66,9 @@ public class LoggingFilter implements Fi
         {
             if (LOGGER.isDebugEnabled())
             {
-                if (user == null)
-                {
-                    // user might have been set by subsequent filters
-                    user = HttpManagementUtil.getRequestPrincipals(httpRequest);
-                }
                 String responseStatus = String.valueOf(httpResponse.getStatus());
-                LOGGER.debug("RESPONSE user='{}' method='{}' url='{}' status='{}'", user, method, url, responseStatus);
+                LOGGER.debug("RESPONSE method='{}' url='{}' status='{}'", method, url, responseStatus);
             }
-
         }
     }
 



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