Log when a room is found for a user

This commit is contained in:
jvyden 2022-01-16 20:34:14 -05:00
commit bd2aff74af
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -26,7 +26,11 @@ namespace LBPUnion.ProjectLighthouse.Helpers
public static FindBestRoomResponse? FindBestRoom(User? user, GameVersion roomVersion, string? location)
{
if (roomVersion == GameVersion.LittleBigPlanet1 || roomVersion == GameVersion.LittleBigPlanetPSP) return null;
if (roomVersion == GameVersion.LittleBigPlanet1 || roomVersion == GameVersion.LittleBigPlanetPSP)
{
Logger.Log($"Returning null for FindBestRoom, game ({roomVersion}) does not support dive in", LoggerLevelMatch.Instance);
return null;
}
bool anyRoomsLookingForPlayers;
List<Room> rooms;
@ -108,6 +112,8 @@ namespace LBPUnion.ProjectLighthouse.Helpers
},
};
Logger.Log($"Found a room (id: {room.RoomId}) for user {user?.Username ?? "null"} (id: {user?.UserId ?? -1})", LoggerLevelMatch.Instance);
return response;
}