Log API failures as warnings

Request failures are so common that it doesn't really justify being an error
This commit is contained in:
JustArchi
2017-01-25 23:23:19 +01:00
parent 238fc77958
commit 16519e4e1c
2 changed files with 14 additions and 5 deletions

View File

@@ -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)) {