Jelajahi Sumber

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

runphp 4 bulan lalu
induk
melakukan
ab2808cde3
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  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');