Commit 92b52cfa authored by Euan游根明's avatar Euan游根明

perf: 日志

parent bc314265
......@@ -55,7 +55,7 @@ class Nacos
}
self::info($logs);
} catch (\Exception $e) {
self::info(['msg'=>'获取配置失败'. $key.':'.$e->getMessage(),'ex'=> $e]);
self::info(['msg'=>'获取配置失败'. $key.':'.$e->getMessage(),'ex'=>$e->getTraceAsString()]);
}
}
......@@ -135,6 +135,7 @@ class Nacos
* @return mixed|string
*/
public static function getConfigRequest($url){
try {
// 创建一个cURL资源
$curl = curl_init();
curl_setopt_array($curl, array(
......@@ -165,6 +166,10 @@ class Nacos
return '';
}
return $data['data'] ?? '';
} catch (\Exception $e) {
self::info(['msg'=>$e->getMessage(),'ex'=>$e->getTraceAsString()]);
}
return $data['data'] ?? '';
}
......@@ -201,7 +206,7 @@ class Nacos
$loginDataArr = json_decode($response,true);
return $loginDataArr['accessToken'] ?? '';
} catch (\Exception $e) {
self::info($e->getMessage());
self::info(['msg'=>$e->getMessage(),'ex'=>$e->getTraceAsString()]);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment