Commit 411f86a5 authored by Liu lu's avatar Liu lu

Vtiful\Kernel\Excel 优化

parent 72eac1eb
...@@ -49,14 +49,19 @@ class LogTraceHandler ...@@ -49,14 +49,19 @@ class LogTraceHandler
public static function createLogTrace($source, $params) public static function createLogTrace($source, $params)
{ {
if(!Coroutine::inCoroutine()) return; if(!Coroutine::inCoroutine()) return;
$userName = '';
try {
$userName = \Meibuyu\Micro\Model\Auth::user()['name'];
}catch (\Throwable $exception){
}
LogTrace::insertOrIgnore([ LogTrace::insertOrIgnore([
'request_id' => self::getRequestId(), 'request_id' => self::getRequestId(),
'origin_params' => json_encode($params), 'origin_params' => json_encode($params),
'source' => $source, 'source' => $source,
'created_at' => now(), 'created_at' => now(),
'process_info' => '', 'process_info' => '',
'user_name' => Context::get('auth')['name']??'' 'user_name' => $userName
]); ]);
} }
......
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