소스 검색

发送客服消息增加日志

liuzejian 1 년 전
부모
커밋
e7699a10b9
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/Service/WechatPlatform/GZHSendKFMessageService.php

+ 5 - 1
app/Service/WechatPlatform/GZHSendKFMessageService.php

@@ -19,8 +19,12 @@ class GZHSendKFMessageService
      */
     public static function sendText($officialAccount, $openid, $content, $traceContext) {
         try {
-            $officialAccount->customer_service->message($content)
+            $res = $officialAccount->customer_service->message($content)
                 ->to($openid)->send();
+            myLog('KFMessageSend')->debug('客服消息发送结果:', [
+                'res' => $res,
+                'traceInfo' => $traceContext->getTraceInfo()
+            ]);
             return true;
         } catch (\Throwable $exception) {
             myLog('KFMessageSend')->error('发送客服消息失败', [