Commit 308304d3 authored by 王源's avatar 王源 🎧

fix bug

parent 63c705d6
......@@ -30,9 +30,10 @@ class ExceptionLogProducer extends ProducerMessage
put_log("file: {$data['file']}", 'ExceptionLogProducerEcho.log');
if (strpos($data['file'], '/vendor/') === false && strpos($data['file'], '/runtime/') === false) {
try {
put_log("git: git blame -L {$data['line']},{$data['line']} {$data['file']}", 'ExceptionLogProducerEcho.log');
put_log("git blame -L {$data['line']},{$data['line']} {$data['file']}", 'ExceptionLogProducerEcho.log');
$output = [];
exec("git blame -L {$data['line']},{$data['line']} {$data['file']}", $output);
put_log("output: {$output[0]}", 'ExceptionLogProducerEcho.log');
put_log("output: " . json_encode($output), 'ExceptionLogProducerEcho.log');
if (!empty($output[0]) && is_string($output[0])) {
preg_match('/(?<=\()[^ ]+/', $output[0], $matches);
put_log("matches: {$matches[0]}", 'ExceptionLogProducerEcho.log');
......
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