Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,9 @@ public function getJobList() {
* @return \OCP\ILogger
*/
public function getLogger() {
if ($this->logger === null) {
//cache the logger for performance reasons
//except when running PHPUNIT tests to make it possible to use getLogger() easily in tests
if ($this->logger === null || (defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
$this->logger = $this->query('Logger');
}
return $this->logger;
Expand Down