调整日志库为zap。

This commit is contained in:
Mr. Lan
2020-08-15 23:34:37 +08:00
parent 9a8ea8d493
commit 8b8d086432
31 changed files with 253 additions and 205 deletions

View File

@@ -6,11 +6,11 @@ package email
*/
import (
"ferry/pkg/logger"
"strconv"
"github.com/spf13/viper"
log "github.com/sirupsen/logrus"
"gopkg.in/gomail.v2"
)
@@ -41,8 +41,8 @@ func server(mailTo []string, subject, body string, args ...string) error {
func SendMail(mailTo []string, subject, body string) {
err := server(mailTo, subject, body)
if err != nil {
log.Println(err)
logger.Info(err)
return
}
log.Println("send successfully")
logger.Info("send successfully")
}