diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-09-29 14:35:32 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-09-29 14:35:32 +0200 |
commit | 5acb38b5b324a76d757074402da69f428712efd6 (patch) | |
tree | 01b02bbf054cbbbe7096d91f7af147de18af867d /core/ajax | |
parent | c2dd0f80ec2d22d07fb3df79e043ff0c3e0090c6 (diff) | |
download | nextcloud-server-5acb38b5b324a76d757074402da69f428712efd6.tar.gz nextcloud-server-5acb38b5b324a76d757074402da69f428712efd6.zip |
[upgrade] switch to debug logging on upgrade
* resets afterwards
* adds output about the previous log level
Diffstat (limited to 'core/ajax')
-rw-r--r-- | core/ajax/update.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index a693deeb9cf..ff18d2bc04b 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -88,6 +88,12 @@ if (OC::checkUpgrade(false)) { $eventSource->close(); OC_Config::setValue('maintenance', false); }); + $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Set log level to debug - current level: "%s"', [ $logLevelName ])); + }); + $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Reset log level to "%s"', [ $logLevelName ])); + }); try { $updater->upgrade(); |