-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLog.Email.cs
More file actions
34 lines (28 loc) · 1.32 KB
/
Log.Email.cs
File metadata and controls
34 lines (28 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.Extensions.Logging;
namespace BookStore.ApiService.Infrastructure.Logging;
public static partial class Log
{
public static partial class Email
{
[LoggerMessage(
Level = LogLevel.Warning,
Message = "SMTP Host is not configured. Cannot send email to {Email}")]
public static partial void SmtpHostNotConfigured(ILogger logger, string email);
[LoggerMessage(
Level = LogLevel.Information,
Message = "Sent email via SMTP to {Email}")]
public static partial void EmailSentSmtp(ILogger logger, string email);
[LoggerMessage(
Level = LogLevel.Error,
Message = "Failed to send email via SMTP to {Email}")]
public static partial void EmailFailedSmtp(ILogger logger, Exception ex, string email);
[LoggerMessage(
Level = LogLevel.Information,
Message = "Verification email logged for {Email}. Subject: {Subject}; Body: {Body}")]
public static partial void VerificationEmailLogged(ILogger logger, string email, string subject, string body);
[LoggerMessage(
Level = LogLevel.Information,
Message = "Processing verification email for {Email}")]
public static partial void ProcessingVerificationEmail(ILogger logger, string email);
}
}