I'm seeing multiple warnings in my server log about forbidden scene
changes. Unfortunately this warning does not include the actual scene
that was triggering the issue, which makes diagnosis/remediation difficult.
Additionally change this logging call to use names suitable for
structured logging.
if (scene != "OnlineGame")
{
_logger.LogWarning(
- "Player {0} ({1}) tried to send SceneChangeFlag with disallowed scene.",
+ "Player {PlayerName} ({ClientId}) tried to send SceneChangeFlag with disallowed scene \"{Scene}\".",
sender.Client.Name,
- sender.Client.Id);
+ sender.Client.Id,
+ scene);
return false;
}