Given that the framework shouldn't be responsible for creating and managing a Logger for the entire application, we needed a way to prevent any code which depended on the 'Logger' service being available from throwing fatal errors.
This PR addresses this problem by creating a proxy class which overrides the __call() magic method to automatically forward log invocations through to the underlying implementation. The LoggerProxy class itself also inherits from Psr\Log\LoggerInterface, which prevents type-hinting and instanceof checks from breaking.
Given that the framework shouldn't be responsible for creating and managing a Logger for the entire application, we needed a way to prevent any code which depended on the 'Logger' service being available from throwing fatal errors.
This PR addresses this problem by creating a proxy class which overrides the __call() magic method to automatically forward log invocations through to the underlying implementation. The LoggerProxy class itself also inherits from Psr\Log\LoggerInterface, which prevents type-hinting and instanceof checks from breaking.