mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
This commit is contained in:
@@ -152,20 +152,6 @@ namespace ArchiSteamFarm.NLog {
|
||||
Logger.Log(logEventInfo);
|
||||
}
|
||||
|
||||
internal void LogInvite(SteamID steamID, [CallerMemberName] string? previousMethodName = null) {
|
||||
if ((steamID.AccountType == EAccountType.Invalid) || (steamID == 0)) {
|
||||
throw new ArgumentNullException(nameof(steamID) + " || " + nameof(steamID.AccountType));
|
||||
}
|
||||
|
||||
string loggedMessage = previousMethodName + "() " + steamID.AccountType + " " + steamID.ConvertToUInt64().ToString();
|
||||
|
||||
LogEventInfo logEventInfo = new LogEventInfo(LogLevel.Trace, Logger.Name, loggedMessage);
|
||||
logEventInfo.Properties["SteamID"] = steamID.ConvertToUInt64();
|
||||
logEventInfo.Properties["AccountType"] = steamID.AccountType;
|
||||
|
||||
Logger.Log(logEventInfo);
|
||||
}
|
||||
|
||||
internal async Task LogFatalException(Exception exception, [CallerMemberName] string? previousMethodName = null) {
|
||||
if (exception == null) {
|
||||
throw new ArgumentNullException(nameof(exception));
|
||||
@@ -217,5 +203,21 @@ namespace ArchiSteamFarm.NLog {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
internal void LogInvite(SteamID steamID, [CallerMemberName] string? previousMethodName = null) {
|
||||
if ((steamID == null) || (steamID.AccountType == EAccountType.Invalid)) {
|
||||
throw new ArgumentNullException(nameof(steamID));
|
||||
}
|
||||
|
||||
ulong steamID64 = steamID;
|
||||
|
||||
string loggedMessage = previousMethodName + "() " + steamID.AccountType + " " + steamID64;
|
||||
|
||||
LogEventInfo logEventInfo = new LogEventInfo(LogLevel.Trace, Logger.Name, loggedMessage);
|
||||
logEventInfo.Properties["AccountType"] = steamID.AccountType;
|
||||
logEventInfo.Properties["SteamID"] = steamID64;
|
||||
|
||||
Logger.Log(logEventInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user