fix(be):使用next-terminal 自定义的日志
This commit is contained in:
@ -3,11 +3,11 @@ package service
|
||||
import (
|
||||
"net/smtp"
|
||||
|
||||
"next-terminal/pkg/log"
|
||||
"next-terminal/server/constant"
|
||||
"next-terminal/server/repository"
|
||||
|
||||
"github.com/jordan-wright/email"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type MailService struct {
|
||||
@ -26,7 +26,7 @@ func (r MailService) SendMail(to, subject, text string) {
|
||||
password := propertiesMap[constant.MailPassword]
|
||||
|
||||
if host == "" || port == "" || username == "" || password == "" {
|
||||
logrus.Debugf("邮箱信息不完整,跳过发送邮件。")
|
||||
log.Debugf("邮箱信息不完整,跳过发送邮件。")
|
||||
return
|
||||
}
|
||||
|
||||
@ -37,6 +37,6 @@ func (r MailService) SendMail(to, subject, text string) {
|
||||
e.Text = []byte(text)
|
||||
err := e.Send(host+":"+port, smtp.PlainAuth("", username, password, host))
|
||||
if err != nil {
|
||||
logrus.Errorf("邮件发送失败: %v", err.Error())
|
||||
log.Errorf("邮件发送失败: %v", err.Error())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user