This commit is contained in:
2021-08-04 18:15:19 +08:00
parent 3fd86129c2
commit 2449b15fc8
2 changed files with 3 additions and 6 deletions
+3 -3
View File
@@ -15,7 +15,6 @@ use Server\Events\OnAfterRequest;
use Snowflake\Abstracts\Component;
use Snowflake\Abstracts\Config;
use Snowflake\Core\Json;
use Snowflake\Event;
use Snowflake\Events\EventProvider;
use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake;
@@ -119,7 +118,7 @@ class Logger extends Component
if (!is_array($this->logs)) {
$this->logs = [];
}
$this->logs[] = [$method, $message];
$this->logs[$method] = $message;
}
@@ -164,7 +163,8 @@ class Logger extends Component
*/
public function getLastError(string $application = 'app'): mixed
{
$filetype = [];
return $this->logs[$application] ?? null;
foreach ($this->logs as $val) {
if ($val[0] != $application) {
continue;
-3
View File
@@ -24,9 +24,6 @@ class EventProvider implements EventProviders
foreach ($this->_listeners[get_class($event)] ?? [] as $listener) {
$queue->insert($listener->listener, $listener->priority);
}
if ($queue->count() > 10) {
var_dump($queue->count());
}
return $queue;
}