You setup the logger conditionally here.. but not in some of the [putCache file](https://github.com/kaltura/mwEmbed/pull/312/files#L25R392) you call it unconditionally causing a '''fatal error'''. 

What we should always try and do in such cases is, have a single method ... i.e $this->log .. and do your checks for isset($this->logger ) .. there and then build out the logger if need be. That same method is also a good place for the $wgLogApiRequests global. Wherever possible we want to avoid having globals and or conditionals in more than one place.