Skip to content

Commit

Permalink
Log argument types instead of values (#9177)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond authored Oct 14, 2024
1 parent 517f6d8 commit ede44b6
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions src/Orleans.Core.Abstractions/Runtime/GrainReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -470,15 +470,32 @@ public static string ToString(IRequest request)
result.Append('.');
result.Append(request.GetMethodName());
result.Append('(');
var argumentCount = request.GetArgumentCount();
for (var n = 0; n < argumentCount; n++)
var argTypes = request.GetMethod()?.GetParameters();
if (argTypes is not null)
{
if (n > 0)
var argumentCount = argTypes.Length;
for (var n = 0; n < argumentCount; n++)
{
result.Append(", ");
if (n > 0)
{
result.Append(", ");
}

result.Append(argTypes[n].ParameterType);
}
}
else
{
var argumentCount = request.GetArgumentCount();
for (var n = 0; n < argumentCount; n++)
{
if (n > 0)
{
result.Append(", ");
}

result.Append(request.GetArgument(n));
result.Append(request.GetArgument(n)?.GetType()?.ToString() ?? "null");
}
}

result.Append(')');
Expand Down

0 comments on commit ede44b6

Please sign in to comment.