logErrof notify

This commit is contained in:
jiangyong 2024-04-27 23:43:21 +08:00
parent 03d106e48e
commit cef4bac1f9
3 changed files with 9 additions and 3 deletions

View File

@ -44,7 +44,7 @@ func initLog() {
log.SetLevel(log.Level(cfg.Server.LogLevel)) log.SetLevel(log.Level(cfg.Server.LogLevel))
} }
func main2() { func main() {
config.LoadServerConfig() config.LoadServerConfig()
config.LoadDadiConfig() config.LoadDadiConfig()
config.LoadHahaConfig() config.LoadHahaConfig()
@ -56,7 +56,7 @@ func main2() {
work.Run() work.Run()
} }
func main() { func main2() {
config.LoadServerConfig() config.LoadServerConfig()
config.LoadDadiConfig() config.LoadDadiConfig()
config.LoadHahaConfig() config.LoadHahaConfig()

View File

@ -60,7 +60,7 @@ func (s *SyncOrder) Sync() {
} }
var arrs []interface{} var arrs []interface{}
if err := json.Unmarshal([]byte(originText), &arrs); err != nil { if err := json.Unmarshal([]byte(originText), &arrs); err != nil {
log.Errorf("json.Unmarsha error :%s", err.Error()) //log.Errorf("json.Unmarsha error :%s", err.Error())
return return
} }
for _, d := range arrs { for _, d := range arrs {

View File

@ -6,6 +6,7 @@ import (
"film/model" "film/model"
"fmt" "fmt"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/smbrave/goutil"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"io" "io"
"net/http" "net/http"
@ -90,7 +91,12 @@ func getInfo(devId string) ([]string, error) {
err = dao.NewNowCarDao().Update(m2) err = dao.NewNowCarDao().Update(m2)
if err != nil { if err != nil {
log.Errorf("db error :%s", err.Error()) log.Errorf("db error :%s", err.Error())
continue
} }
//订单完成提示
log.Errorf("shopName=%s workstation=%s time=[%s-%s]",
m2.ShopName, m2.Workstation, goutil.TimeToDateTime(m2.StartTime),
goutil.TimeToDateTime(m2.EndTime))
} }
} }