serilog 增加环境发生错误发送邮件
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-22 09:57:25 +08:00
parent 9b91472186
commit f6252f62c4
11 changed files with 67 additions and 48 deletions
@@ -55,6 +55,7 @@ public class ProjectExceptionFilter(ILogger<ProjectExceptionFilter> _logger, ISt
var errorInfo = $"Exception: {exception.Message}[{exception.StackTrace}]" + (exception.InnerException != null ? $" InnerException: {exception.InnerException.Message}[{exception.InnerException.StackTrace}]" : "");
_logger.LogError(errorInfo);
//_logger.LogError(exception, exception.Message);
@@ -63,6 +63,10 @@ public class SystemEmailSendConfig
public string CompanyShortNameCN { get; set; } = string.Empty;
public bool IsEnv_US { get; set; }
public bool IsOpenErrorNoticeEmail { get; set; }
public List<string> ErrorNoticeEmailList { get; set; } =new List<string>();
}
public class SystemEmailSendConfigView