]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Логирование request
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 15 Aug 2025 10:49:19 +0000 (13:49 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 15 Aug 2025 10:49:19 +0000 (13:49 +0300)
erp24/api2/controllers/DataController.php

index 7e2824964186deb3810561ae905ef1c0ea27736f..7c9b3bf8d4220055b318c0d2f0812e5949b4125c 100644 (file)
@@ -233,6 +233,12 @@ class DataController extends BaseController
 
             $apiCron = ApiCron::find()->where(['status' => 0])->orderBy(['date' => SORT_ASC])->one();
             $mess['line'][] = json_encode($apiCron, JSON_UNESCAPED_UNICODE);
+                $mess['debug'] = [
+                    'is_object' => is_object($apiCron),
+                    'class' => get_class($apiCron),
+                    'attributes' => $apiCron ? $apiCron->attributes : null,
+                    'errors' => $apiCron ? $apiCron->errors : null
+                ];
             if (!empty($apiCron)) {
                 $mess['line'][] = __LINE__;
                 $jsonId = $apiCron->request_id;
@@ -259,7 +265,7 @@ class DataController extends BaseController
                 $jsonDecoded = json_decode($apiCron->json_post, true);
                 $mess['line'][] = __LINE__;
                 $jsonDecoded['mess'] = $mess;
-                
+
                 $createEmployeeArray = $this->getCreateEmployee();
                 if (!empty($createEmployeeArray)) {
                     $jsonDecoded['create_employee'] = $createEmployeeArray;