فهرست منبع

添加土地变更数据调试日志

notfff 7 ماه پیش
والد
کامیت
e230d1ef7d

+ 12 - 1
app/Module/AppGame/HttpControllers/ProtobufController.php

@@ -29,6 +29,17 @@ class ProtobufController extends Controller
      */
     public function gameapi(HttpRequest $httpRequest)
     {
+        // 获取请求参数
+        Log::info('请求信息', [
+            'method' => $httpRequest->method(),
+            'path' => $httpRequest->path(),
+            'content_type' => $httpRequest->header('Content-Type'),
+            'request_unid' => RUN_UNIQID,
+            'header'=>[
+                'token'=>$httpRequest->header('token')
+            ]
+        ]);
+
         // 初始化请求日志记录器
         $requestLogger = new \App\Module\System\Services\RequestLogger($httpRequest);
 
@@ -221,7 +232,7 @@ class ProtobufController extends Controller
                 $hasActionFunc = 'has' .ucfirst($field). $actionName;
                 $getActionFunc = 'get' . ucfirst($field).$actionName;
                 $request->hasHouseUp();
-                Logger::debug('<UNK>', [$hasMethod, $getMethod, $hasActionFunc]);
+//                Logger::debug('<UNK>', [$hasMethod, $getMethod, $hasActionFunc]);
                 if ( $request->$hasActionFunc()) {
                     return [
                         'field' => $field,

+ 8 - 0
app/Module/AppGame/Listeners/AppGameProtobufResponseListener.php

@@ -119,6 +119,14 @@ class AppGameProtobufResponseListener
             $landChanges = LandTemp::getUserLandChanges($user_id);
             $landStatusChanges = LandTemp::getUserLandStatusChanges($user_id);
 
+            Log::debug('获取土地变更数据', [
+                'user_id' => $user_id,
+                'land_changes_count' => count($landChanges),
+                'status_changes_count' => count($landStatusChanges),
+                'land_changes' => $landChanges,
+                'status_changes' => $landStatusChanges
+            ]);
+
             // 合并两种土地变更数据,获取所有变更的土地ID
             $allLandChanges = array_merge($landChanges, $landStatusChanges);
             $changedLandIds = array_keys($allLandChanges);