Skip to content

Commit e788e0f

Browse files
committed
fix(repo): 请求失败的日志
1 parent 83d407b commit e788e0f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

laravel/app/Http/Repository/MultithreadingRepository.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,14 @@ public function newRequest($url, $appkey)
306306
if (is_object($reason) && is_callable([$reason, 'getMessage'])) {
307307
$reason = 'Line:'.$reason->getLine().' in '.$reason->getFile().'; Message: '.$reason->getMessage();
308308
}
309-
Log::error('MultithreadingRepository.php Line:309 Get Failed Request: ', ['ExcelName' => $this->fileName, 'Index' => $index, 'Param' => $this->dataSet['data'][$index], 'Error' => $reason]);
309+
$log = [
310+
'Param' => $this->dataSet['param'],
311+
'Data' => $this->dataSet['data'][$index],
312+
'ExcelName' => $this->fileName,
313+
'Index' => $index,
314+
'Error' => $reason
315+
];
316+
Log::error('MultithreadingRepository.php Line:316 Get Failed Request: ', $log);
310317
$this->data[$index] = '';
311318
// 拼接字符串--后面跟的 $reason 是对象导致异常退出任务
312319
// return 'Index: '.$index.' Reason:'.$reason;

0 commit comments

Comments
 (0)