AvalonInterceptorContext interceptorContext, StopWatch stopWatch, int mode )
{
StringBuffer result = new StringBuffer();
Method method = interceptorContext.getMethod();
Object[] args = interceptorContext.getArgs();
InterceptorToStringBuilder toStringBuilder = null;
MethodToStringBuilderImpl methodToStringBuilder = new MethodToStringBuilderImpl(method);
if( args == null )
{
args = new Object[0];
}
result.append(interceptorContext.getTransactionId());
result.append(SEPERATOR);
result.append(interceptorContext.getInvocationId());
result.append(SEPERATOR);
result.append(interceptorContext.getInvocationDepth());
result.append(SEPERATOR);
result.append(mode);
result.append(SEPERATOR);
result.append(interceptorContext.getServiceShorthand());
result.append(SEPERATOR);
result.append(method.getName());
result.append(SEPERATOR);
if( stopWatch != null )
{
result.append(stopWatch.getTime());
}
else
{
result.append('0');
}
result.append(SEPERATOR);
result.append(methodToStringBuilder.toString());
if( (ON_ENTRY == mode) || (ON_ERROR == mode) )
{
for( int i=0; i<args.length; i++ )
{
toStringBuilder = this.createArgumentToStringBuilder(args[i]);
result.append(SEPERATOR);
result.append("arg[" + i + "]:={");
result.append( toStringBuilder.toString());
result.append("}");
}
}
return result.toString();