hello. There are some issues that could not be resolved while using the library.
public class GamingHub : StreamingHubBase<IGamingHub, IGamingHubReceiver>, IGamingHub
{
public async ValueTask<Player[]> JoinAsync(string roomName, string userName, Vector3 position, Quaternion rotation)
{
}
}
In the GamingHub example, I want to output the roomName, userName, position, and rotation values used when calling the JoinAsync method through a filter. I also want to output the response value, but how can I get the desired result?
Create a constructor for your GamingHub class. Get ILogger from DI container. Use that to log stuff inside your hub. Check here for more info on using ILogger https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-8.0
I'm not sure what you mean by response values, but if you mean http response data, then you should be able to log those using a filter after awaiting next inside Invoke. You can add ILogger the same way I mentioned above to filters as well.
hello. There are some issues that could not be resolved while using the library.
In the GamingHub example, I want to output the roomName, userName, position, and rotation values used when calling the JoinAsync method through a filter. I also want to output the response value, but how can I get the desired result?