- more error and warn output.

This commit is contained in:
gazebo
2018-07-01 10:11:28 +08:00
parent e26edffca4
commit 28921345e8
4 changed files with 7 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ func (o *OrderController) NewOrder(msg *elmapi.CallbackMsg, orderId string) *elm
created, _, err := db.ReadOrCreate(rec, "OrderId")
if err != nil {
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v", err)
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v, rec:%v", err, rec)
return errResponseDBError
}
if created || rec.Type != msg.Type {
@@ -74,7 +74,7 @@ func (o *OrderController) OrderStatusChanged(msg *elmapi.CallbackMsg, orderId st
err := db.Read(rec, "OrderId")
if err != nil {
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v", err)
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v, rec:%v", err, rec)
} else {
if rec.Type != msg.Type {
err = globals2.FreshFoodAPI.ELMOrderStatus(orderId, msg.Type, utils.GetCurTimeStr())