Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nacos-config
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Euan游根明
nacos-config
Commits
92b52cfa
Commit
92b52cfa
authored
Dec 04, 2023
by
Euan游根明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 日志
parent
bc314265
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
30 deletions
+35
-30
Nacos.php
src/Nacos/Nacos.php
+35
-30
No files found.
src/Nacos/Nacos.php
View file @
92b52cfa
...
...
@@ -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
()]
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment