Commit f629c898 authored by 王源's avatar 王源 🎧

添加打印

parent b0e265fd
......@@ -24,11 +24,15 @@ class ExceptionLogProducer extends ProducerMessage
put_log('获取操作人失败; ' . $e->getMessage(), 'ExceptionLogProducer.log');
}
// 排除依赖包文件和运行缓存文件
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');
exec("git blame -L {$data['line']},{$data['line']} {$data['file']}", $output);
put_log("output: $output", 'ExceptionLogProducerEcho.log');
if (!empty($output[0]) && is_string($output[0])) {
preg_match('/(?<=\()[^ ]+/', $output[0], $matches);
put_log("matches: $matches", 'ExceptionLogProducerEcho.log');
if (!empty($matches[0])) {
$data['coder'] = $matches[0];
}
......
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