Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
without authentication
meibuyu-micro
Commits
d151b6bc
Commit
d151b6bc
authored
Jun 07, 2021
by
王源
🎧
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 2.0
parents
fc516801
74014251
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ExceptionLogProducer.php
src/Amqp/Producer/ExceptionLogProducer.php
+2
-2
No files found.
src/Amqp/Producer/ExceptionLogProducer.php
View file @
d151b6bc
...
@@ -25,7 +25,7 @@ class ExceptionLogProducer extends ProducerMessage
...
@@ -25,7 +25,7 @@ class ExceptionLogProducer extends ProducerMessage
}
}
// 获取trace中真实文件和行数
// 获取trace中真实文件和行数
if
(
!
empty
(
$data
[
'trace'
]))
{
if
(
!
empty
(
$data
[
'trace'
]))
{
preg_match
(
'/(\/var\/www\/
html\/.+?\/
app\/.+?\.php)(?=\()/'
,
$data
[
'trace'
],
$matchFiles
);
preg_match
(
'/(\/var\/www\/app\/.+?\.php)(?=\()/'
,
$data
[
'trace'
],
$matchFiles
);
if
(
!
empty
(
$matchFiles
[
0
]))
{
if
(
!
empty
(
$matchFiles
[
0
]))
{
$data
[
'file'
]
=
$matchFiles
[
0
];
$data
[
'file'
]
=
$matchFiles
[
0
];
$file
=
str_replace
(
'/'
,
'\/'
,
$matchFiles
[
0
]);
$file
=
str_replace
(
'/'
,
'\/'
,
$matchFiles
[
0
]);
...
@@ -39,7 +39,7 @@ class ExceptionLogProducer extends ProducerMessage
...
@@ -39,7 +39,7 @@ class ExceptionLogProducer extends ProducerMessage
}
}
if
(
!
empty
(
$data
[
'file'
]))
{
if
(
!
empty
(
$data
[
'file'
]))
{
// 只对项目app文件夹下的错误获取编码人
// 只对项目app文件夹下的错误获取编码人
preg_match
(
'/(\/var\/www\/
html\/.+?\/
app\/)/'
,
$data
[
'file'
],
$matchPaths
);
preg_match
(
'/(\/var\/www\/app\/)/'
,
$data
[
'file'
],
$matchPaths
);
if
(
!
empty
(
$matchPaths
[
0
]))
{
if
(
!
empty
(
$matchPaths
[
0
]))
{
try
{
try
{
exec
(
"cd
{
$matchPaths
[
0
]
}
&& git blame -L
{
$data
[
'line'
]
}
,
{
$data
[
'line'
]
}
{
$data
[
'file'
]
}
"
,
$output
);
exec
(
"cd
{
$matchPaths
[
0
]
}
&& git blame -L
{
$data
[
'line'
]
}
,
{
$data
[
'line'
]
}
{
$data
[
'file'
]
}
"
,
$output
);
...
...
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