Ver Fonte

fix(lakala): 优化通知日志记录格式以提高调试信息可读性

runphp há 4 meses atrás
pai
commit
ab2808cde3
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      src/Service/NotifyService.php

+ 4 - 1
src/Service/NotifyService.php

@@ -23,7 +23,10 @@ class NotifyService
     public function notify(): void
     {
         $notify = $this->notifyApi->notiApi();
-        Log::debug('lakala notify '. json_encode($notify));
+        Log::debug('lakala notify {headers} {body}', [
+            'headers' => $notify->getHeaders(),
+            'body' => $notify->getOriginalText(),
+        ]);
         $inBody = $notify->getOriginalText();
         if (!json_validate($inBody)) {
             throw_logic_exception('lakala notify json error');