mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Move main ArchiLogger from ASF to Program
It makes more sense to put it in ASF class due to sharing potential, but I want to unify ArchiBoT logging and this makes it easier for maintenance
This commit is contained in:
@@ -950,7 +950,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static uint GetAppIDFromMarketHashName(string hashName) {
|
||||
if (string.IsNullOrEmpty(hashName)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(hashName));
|
||||
Program.ArchiLogger.LogNullError(nameof(hashName));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -965,7 +965,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static Steam.Item.EType GetItemType(string name) {
|
||||
if (string.IsNullOrEmpty(name)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(name));
|
||||
Program.ArchiLogger.LogNullError(nameof(name));
|
||||
return Steam.Item.EType.Unknown;
|
||||
}
|
||||
|
||||
@@ -1006,32 +1006,32 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static bool ParseItems(Dictionary<ulong, Tuple<uint, Steam.Item.EType>> descriptions, List<KeyValue> input, HashSet<Steam.Item> output) {
|
||||
if ((descriptions == null) || (input == null) || (input.Count == 0) || (output == null)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
|
||||
Program.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (KeyValue item in input) {
|
||||
uint appID = item["appid"].AsUnsignedInteger();
|
||||
if (appID == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(appID));
|
||||
Program.ArchiLogger.LogNullError(nameof(appID));
|
||||
return false;
|
||||
}
|
||||
|
||||
ulong contextID = item["contextid"].AsUnsignedLong();
|
||||
if (contextID == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(contextID));
|
||||
Program.ArchiLogger.LogNullError(nameof(contextID));
|
||||
return false;
|
||||
}
|
||||
|
||||
ulong classID = item["classid"].AsUnsignedLong();
|
||||
if (classID == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(classID));
|
||||
Program.ArchiLogger.LogNullError(nameof(classID));
|
||||
return false;
|
||||
}
|
||||
|
||||
uint amount = item["amount"].AsUnsignedInteger();
|
||||
if (amount == 0) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(amount));
|
||||
Program.ArchiLogger.LogNullError(nameof(amount));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user