summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-02-11 09:08:02 +0100
committerJulius Härtl <jus@bitgrid.net>2022-02-28 11:24:41 +0100
commiteede608c0e9cd313bc672df1f0e37aca2a0ef2ad (patch)
tree2a61d39c2c379416cfa4dde85e51be949538d242 /lib/base.php
parent0f33453610c46ef730192820017f8c1270b3096f (diff)
downloadnextcloud-server-eede608c0e9cd313bc672df1f0e37aca2a0ef2ad.tar.gz
nextcloud-server-eede608c0e9cd313bc672df1f0e37aca2a0ef2ad.zip
Add event logging to app loading
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 3c10f7cb33a..3ce9d4d9c95 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -61,6 +61,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
+
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Group\Events\UserRemovedEvent;
use OCP\ILogger;
@@ -595,8 +596,13 @@ class OC {
// setup the basic server
self::$server = new \OC\Server(\OC::$WEBROOT, self::$config);
self::$server->boot();
+
$eventLogger = \OC::$server->getEventLogger();
$eventLogger->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);
+ $eventLogger->start('request', 'Full request after autoloading');
+ register_shutdown_function(function () use ($eventLogger) {
+ $eventLogger->end('request');
+ });
$eventLogger->start('boot', 'Initialize');
// Override php.ini and log everything if we're troubleshooting
@@ -792,6 +798,7 @@ class OC {
}
}
$eventLogger->end('boot');
+ $eventLogger->log('init', 'OC::init', $loaderStart, microtime(true));
}
/**