This commit is contained in:
2021-12-08 11:39:57 +08:00
parent 9f36acbbca
commit 80713788c9
+3 -2
View File
@@ -15,7 +15,7 @@ use Server\Events\OnWorkerStop;
/** /**
* *
*/ */
class Logger extends Component implements LoggerInterface class Logger implements LoggerInterface
{ {
const EMERGENCY = 'emergency'; const EMERGENCY = 'emergency';
@@ -36,10 +36,11 @@ class Logger extends Component implements LoggerInterface
/** /**
* @return void * @return void
* @throws ReflectionException
*/ */
public function init() public function init()
{ {
$this->eventProvider->on(OnWorkerStop::class, [$this, 'onAfterRequest']); Kiri::getDi()->get(EventProvider::class)->on(OnWorkerStop::class, [$this, 'onAfterRequest']);
} }