Parcourir la source

fix(lakala): 修复拉卡拉通知服务中的 headers 日志记录问题

- 将 headers 数据转换为 JSON 格式以便正确记录日志
- 确保日志中能完整展示请求头信息内容
- 避免因对象无法序列化导致的日志缺失问题
runphp il y a 4 mois
Parent
commit
f730c343e6
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/Service/NotifyService.php

+ 1 - 1
src/Service/NotifyService.php

@@ -24,7 +24,7 @@ class NotifyService
     {
         $notify = $this->notifyApi->notiApi();
         Log::debug('lakala notify {headers} {body}', [
-            'headers' => $notify->getHeaders(),
+            'headers' => json_encode($notify->getHeaders()),
             'body' => $notify->getOriginalText(),
         ]);
         $inBody = $notify->getOriginalText();