The great logger.Error cleanup!

This commit is contained in:
Keivan Beigi
2017-01-05 15:32:17 -08:00
parent e45d4f60a4
commit 73840dcacc
73 changed files with 201 additions and 208 deletions
@@ -42,7 +42,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
}
catch (PushBulletException ex)
{
_logger.Error(ex, "Unable to send test message to: " + channelTag);
_logger.Error(ex, "Unable to send test message to {0}", channelTag);
error = true;
}
}
@@ -61,7 +61,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
}
catch (PushBulletException ex)
{
_logger.Error(ex, "Unable to send test message to: " + deviceId);
_logger.Error(ex, "Unable to send test message to {0}", deviceId);
error = true;
}
}
@@ -101,16 +101,16 @@ namespace NzbDrone.Core.Notifications.PushBullet
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.Error(ex, "API Key is invalid: " + ex.Message);
_logger.Error(ex, "API Key is invalid");
return new ValidationFailure("ApiKey", "API Key is invalid");
}
_logger.Error(ex, "Unable to send test message: " + ex.Message);
_logger.Error(ex, "Unable to send test message");
return new ValidationFailure("ApiKey", "Unable to send test message");
}
catch (Exception ex)
{
_logger.Error(ex, "Unable to send test message: " + ex.Message);
_logger.Error(ex, "Unable to send test message");
return new ValidationFailure("", "Unable to send test message");
}
@@ -165,7 +165,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.Error(ex, "API Key is invalid: " + ex.Message);
_logger.Error(ex, "API Key is invalid");
throw;
}