mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Log API failures as warnings
Request failures are so common that it doesn't really justify being an error
This commit is contained in:
@@ -131,6 +131,15 @@ namespace ArchiSteamFarm {
|
||||
Logger.Warn($"{previousMethodName}() {message}");
|
||||
}
|
||||
|
||||
internal void LogGenericWarningException(Exception exception, [CallerMemberName] string previousMethodName = null) {
|
||||
if (exception == null) {
|
||||
LogNullError(nameof(exception));
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Warn(exception, $"{previousMethodName}()");
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "ExplicitCallerInfoArgument")]
|
||||
internal void LogNullError(string nullObjectName, [CallerMemberName] string previousMethodName = null) {
|
||||
if (string.IsNullOrEmpty(nullObjectName)) {
|
||||
|
||||
Reference in New Issue
Block a user