From d56e83eee0895885b4cc50076c7093ed3c54404d Mon Sep 17 00:00:00 2001 From: TidusJar Date: Wed, 2 Jan 2019 13:18:12 +0000 Subject: [PATCH] email logging !wip --- src/Ombi.Notifications/GenericEmailProvider.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ombi.Notifications/GenericEmailProvider.cs b/src/Ombi.Notifications/GenericEmailProvider.cs index 462f8918e..04928d1dc 100644 --- a/src/Ombi.Notifications/GenericEmailProvider.cs +++ b/src/Ombi.Notifications/GenericEmailProvider.cs @@ -83,15 +83,15 @@ namespace Ombi.Notifications { client.Authenticate(settings.Username, settings.Password); } - //Log.Info("sending message to {0} \r\n from: {1}\r\n Are we authenticated: {2}", message.To, message.From, client.IsAuthenticated); + _log.LogDebug("sending message to {0} \r\n from: {1}\r\n Are we authenticated: {2}", message.To, message.From, client.IsAuthenticated); await client.SendAsync(message); await client.DisconnectAsync(true); } } catch (Exception e) { - //Log.Error(e); - throw new InvalidOperationException(e.Message); + _log.LogError(e, "Exception when attempting to send an email"); + throw; } }