34 }
catch (\Throwable $e) {
35 $this->
log(LogLevel::CRITICAL, $e);
44 $services = $this->app->internal_services;
47 $services->db->executeDelayedQueries();
49 $db_calls = $services->db->getQueryCount();
50 $this->
log(LogLevel::INFO,
"DB Queries for this page: $db_calls");
70 $services = $this->app->internal_services;
72 if (!$services->events->triggerBefore(
'shutdown',
'system')) {
76 $services->events->trigger(
'shutdown',
'system');
79 if (isset($GLOBALS[
'START_MICROTIME'])) {
81 $uri = $services->request->server->get(
'REQUEST_URI',
'CLI');
82 $this->
log(LogLevel::INFO,
"Page {$uri} generated in $time seconds");
85 $services->events->triggerAfter(
'shutdown',
'system');
93 $this->app->internal_services->autoloadManager->saveCache();
shutdownApplication()
Emits a shutdown:system event upon PHP shutdown, but before database connections are dropped...
if(!$annotation instanceof ElggAnnotation) $time
persistCaches()
Persist some of the core caches.
trait Loggable
Enables adding a logger.
__construct(protected Application $app)
Constructor.
log($level, $message, array $context=[])
Log a message.
Load, boot, and implement a front controller for an Elgg application.
shutdownDatabase()
Shutdown the database, execute delayed queries and do some logging.