T type logging

This commit is contained in:
Alex
2025-01-15 15:06:54 +00:00
parent f9f108448a
commit 8b3305efca
100 changed files with 1229 additions and 761 deletions
@@ -0,0 +1,43 @@
namespace Core.Models.Eft.Ws;
public enum NotificationEventType
{
AssortmentUnlockRule,
ExamineItems,
ExamineAllItems,
ForceLogout,
RagfairOfferSold,
RagfairNewRating,
RagfairRatingChange,
new_message,
ping,
TraderSalesSum,
trader_supply,
TraderStanding,
UnlockTrader,
groupMatchRaidSettings,
groupMatchRaidNotReady,
groupMatchRaidReady,
groupMatchInviteAccept,
groupMatchInviteDecline,
groupMatchInviteSend,
groupMatchLeaderChanged,
groupMatchStartGame,
groupMatchUserLeave,
groupMatchWasRemoved,
groupMatchUserHasBadVersion,
userConfirmed,
UserMatched,
userMatchOver,
channel_deleted,
friendListRequestAccept,
friendListRequestDecline,
friendListNewRequest,
youAreRemovedFromFriendList,
YouWereAddedToIgnoreList,
youAreRemoveFromIgnoreList,
ProfileLockTimer,
StashRows,
SkillPoints,
tournamentWarning,
}
+2 -2
View File
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Ws;
public class WsNotificationEvent
{
[JsonPropertyName("type")]
public string? EventType { get; set; }
public NotificationEventType? EventType { get; set; }
[JsonPropertyName("eventId")]
public string? EventIdentifier { get; set; }
}
}
+6 -1
View File
@@ -2,4 +2,9 @@ namespace Core.Models.Eft.Ws;
public class WsPing : WsNotificationEvent
{
}
public WsPing()
{
EventType = NotificationEventType.ping;
EventIdentifier = "ping";
}
}
-17
View File
@@ -1,17 +0,0 @@
using Core.Models.Logging;
namespace Core.Models.Utils;
public interface ILogger
{
// TODO: Removing these 4 methods for now, revisit in the future
// void WriteToLogFile(string data);
// void Log(string data, LogTextColor? color, string? backgroundColor = null);
void LogWithColor(string data, LogTextColor? textColor = null, LogBackgroundColor? backgroundColor = null);
void Success(string data);
void Error(string data);
void Warning(string data);
void Info(string data);
void Debug(string data);
void Critical(string data);
}
+17
View File
@@ -0,0 +1,17 @@
using Core.Models.Logging;
namespace Core.Models.Utils;
public interface ISptLogger<T>
{
// TODO: Removing these 4 methods for now, revisit in the future
// void WriteToLogFile(string data);
// void Log(string data, LogTextColor? color, string? backgroundColor = null);
void LogWithColor(string data, Exception? ex = null, LogTextColor? textColor = null, LogBackgroundColor? backgroundColor = null);
void Success(string data, Exception? ex = null);
void Error(string data, Exception? ex = null);
void Warning(string data, Exception? ex = null);
void Info(string data, Exception? ex = null);
void Debug(string data, Exception? ex = null);
void Critical(string data, Exception? ex = null);
}