diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-03-02 12:00:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 12:00:44 +0100 |
commit | 2ff0c972c98a14f4dbd81d7923b119770600918f (patch) | |
tree | e6e93fb8bd7e9cc3657752534c94a7347c0b2109 /lib/base.php | |
parent | 18bafefb00add3a7e075e58c1edb420c27a61a24 (diff) | |
parent | 83717a7800e8854b3f3ba17608157598d1fe28ca (diff) | |
download | nextcloud-server-2ff0c972c98a14f4dbd81d7923b119770600918f.tar.gz nextcloud-server-2ff0c972c98a14f4dbd81d7923b119770600918f.zip |
Merge pull request #31124 from nextcloud/enh/diagnostics-logging
Diagnostics event logging to log
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index c9f0ca008ba..2dd878fdbbc 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 @@ -794,6 +800,7 @@ class OC { } } $eventLogger->end('boot'); + $eventLogger->log('init', 'OC::init', $loaderStart, microtime(true)); } /** |