Should probably have the logger optional (`\OC\Log $log = null` in constructor) and checking `!is_null($this->log)` here.