feat(log): 全面重构日志系统,支持日志级别、去除ANSI乱码并抑制高频轮询
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -15,6 +14,7 @@ import (
|
||||
"time"
|
||||
|
||||
"affiliate_dash/internal/model"
|
||||
"affiliate_dash/internal/pkg/applog"
|
||||
"affiliate_dash/internal/pkg/timeutil"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -372,7 +372,7 @@ func (s *RechargeService) CheckLowBalanceAndNotify(merchantID uint) {
|
||||
continue
|
||||
}
|
||||
if err := sendChannelMessage(channel, "余额告警", content); err != nil {
|
||||
log.Printf("低余额告警推送失败 merchant=%d channel=%d: %v", merchantID, channel.ID, err)
|
||||
applog.Errorf("[recharge] 低余额告警推送失败 merchant=%d channel=%d: %v", merchantID, channel.ID, err)
|
||||
continue
|
||||
}
|
||||
sent = true
|
||||
|
||||
Reference in New Issue
Block a user