优化日志打印
This commit is contained in:
parent
6131980b99
commit
fe56151d13
|
|
@ -1021,6 +1021,7 @@ class curls
|
|||
// 选择执行URL,提交的数据,对数据的处理,提交服务端,数据的处理,返回结果
|
||||
$this->urlarr = [
|
||||
// 应用信息验证URL
|
||||
// 'ck' => 'https://app.muban.net.cn/api/appcheck.php?a=do',
|
||||
'ck' => 'https://app.muban.net.cn/api/appcheck.php?a=do',
|
||||
// 应用下载更新URL
|
||||
'dl' => 'https://app.muban.net.cn/api/download.php?a=do',
|
||||
|
|
@ -1094,6 +1095,7 @@ class curls
|
|||
if ($errno){
|
||||
// 如果发生错误,记录错误信息到日志文件
|
||||
$logMessage = "[" . date('Y-m-d H:i:s') . "] ERROR: HTTP Code: $code, cURL Error No: $errno, Error: $error\n";
|
||||
$logMessage .= "--URL:".$this->apiurl."--headers:".var_export($this->headers, true)."--data:".var_export($this->data,true);
|
||||
file_put_contents(PATH_APP_FILE.'config/curl_error.log', $logMessage, FILE_APPEND); // 将日志追加到文件中
|
||||
|
||||
$this->data = $this->appcore->codemsg(4011, "{$code}-{$errno}")->coderes(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue