modify plugin name

This commit is contained in:
2022-03-01 17:58:10 +08:00
parent 54e1ecd10f
commit b601c4150b
+2 -13
View File
@@ -161,25 +161,14 @@ class Logger implements LoggerInterface
$_string = '[' . now() . '] production.' . $level . ': ' . $this->_string($message, $context); $_string = '[' . now() . '] production.' . $level . ': ' . $this->_string($message, $context);
file_put_contents('php://output', $_string); file_put_contents('php://output', $_string);
}
/**
* @param OnWorkerStop $param
* @throws Exception
*/
public function onAfterRequest(OnWorkerStop $param)
{
$loggers = implode(PHP_EOL, $this->_loggers);
$this->_loggers = [];
if (!empty($loggers)) {
$filename = storage('log-' . date('Y-m-d') . '.log', 'log/'); $filename = storage('log-' . date('Y-m-d') . '.log', 'log/');
file_put_contents($filename, $loggers); file_put_contents($filename, $_string);
}
} }
/** /**
* @return void * @return void
* @throws Exception * @throws Exception