Added some more debug logging for when retrieving the session cookie

This commit is contained in:
barelyprofessional
2024-09-07 17:04:23 +08:00
parent 6f7470c0b3
commit 081c42ec28

View File

@@ -1,4 +1,5 @@
using System.Net;
using System.Text.Json;
using HtmlAgilityPack;
using KfChatDotNetBot.Settings;
using NLog;
@@ -148,7 +149,10 @@ public class KfTokenService
public string? GetXfSessionCookie()
{
_logger.Debug("JSON serialization of all the cookies");
_logger.Debug(JsonSerializer.Serialize(_cookies.GetAllCookies()));
var cookie = _cookies.GetAllCookies()["xf_session"];
_logger.Debug($"xf_session => {cookie?.Value}");
return cookie?.Value;
}