log.trace(target + "." + methodName + "() ok");
log.trace(target + "." + methodName + "() OK");
   public Object invoke(Invocation invocation) throws Throwable   {      Method method = null;      String methodName = null;      Object target = null;      if (trace)      {         target = invocation.getTargetObject();         if (!(invocation instanceof MethodInvocation))         {            log.trace("invoking non-method invocation: " + invocation);         }         else         {            MethodInvocation mi = (MethodInvocation)invocation;            method = mi.getMethod();            methodName = method.getName();            StringBuffer sb = new StringBuffer();            sb.append("invoking ").append(target).append('.').append(methodName).append('(');            Object[] args = mi.getArguments();            if (args != null)            {               for(int i = 0; i < args.length; i++)               {                  // special precaution to hide passwords                  if ("createConnectionDelegate".equals(methodName) && i == 1)                  {                     sb.append("*****");                  }                  else                  {                     sb.append(args[i]);                  }                  if (i < args.length - 1)                  {                     sb.append(", ");                  }               }            }            sb.append(')');            log.trace(sb.toString());         }      }      Object res = invocation.invokeNext();      if (trace)      {         if (method == null)         {            log.trace(invocation + " successfully invoked on " + target);         }         else         {            if (method.getReturnType() != Void.TYPE)            {               log.trace(target + "." + methodName + "() returned " + res);            }            else            {               log.trace(target + "." + methodName + "() ok");            }         }      }      return res;   }