Commit c35d2b2c by 王召彬

fixbug:协程方式记腾讯云日志

parent e3277fdf
......@@ -58,9 +58,21 @@ class LogHandler extends AbstractProcessingHandler
$messageText = implode(" __||__ ", $records);
if($this->topicId == ClsLog::TOPICID_ERROR) {
ClsLog::error($messageText);
if (App::isCoContext()) {
go(function () use ($messageText) {
ClsLog::error($messageText);
});
} else {
ClsLog::error($messageText);
}
} else if($this->topicId == ClsLog::TOPICID_NOTICE) {
ClsLog::notice($messageText);
if (App::isCoContext()) {
go(function () use ($messageText) {
ClsLog::notice($messageText);
});
} else {
ClsLog::notice($messageText);
}
}
}
......
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