diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-05-19 15:47:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 15:47:13 +0300 |
commit | 7a22039ce01960cd7606f1d22cb8ddabb0782eb5 (patch) | |
tree | 7de64c85263e987564a3735945c60f201a02ad37 /lib | |
parent | 71cc9441ad6b1c3adf765a82bf047a77f5af7cc6 (diff) | |
parent | 0556fe351a89e2658eae9cc0d5b9ca212adb374b (diff) |
Merge pull request #21044 from nextcloud/enhancement/app-disable-log-message
Add a message to the log entry of an app being disabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_App.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 2454d6be4f0..bfa894fa800 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -157,11 +157,17 @@ class OC_App { if ($ex instanceof ServerNotAvailableException) { throw $ex; } - \OC::$server->getLogger()->logException($ex); - if (!\OC::$server->getAppManager()->isShipped($app) && !self::isType($app, ['authentication'])) { + \OC::$server->getLogger()->logException($ex, [ + 'message' => "App $app threw an error during app.php load and will be disabled: " . $ex->getMessage(), + ]); + // Only disable apps which are not shipped and that are not authentication apps \OC::$server->getAppManager()->disableApp($app, true); + } else { + \OC::$server->getLogger()->logException($ex, [ + 'message' => "App $app threw an error during app.php load: " . $ex->getMessage(), + ]); } } \OC::$server->getEventLogger()->end('load_app_' . $app); |