src/Phapi/Di/Validator/Log.php
public function validate($logger)
    {
        $original = $logger;

        if (is_callable($logger)) {
            $logger = $logger($this->container);
        }

        // Check if logger is an instance of the PSR-3 logger interface
        if ($logger instanceof LoggerInterface) {
            return $original;
        }

        // A PSR-3 compatible log writer hasn't been configured so we don't know if it is
        // compatible with Phapi. Therefore we create an instance of the NullLogger instead
        return function ($app) {
            return new NullLogger();
        };
    }
public function validate($logger)
    {
        $original = $logger;

        if (is_callable($logger)) {
            $logger = $logger($this->container);
        }

        // Check if logger is an instance of the PSR-3 logger interface
        if ($logger instanceof LoggerInterface) {
            return $original;
        }

        // A PSR-3 compatible log writer hasn't been configured so we don't know if it is
        // compatible with Phapi. Therefore we create an instance of the NullLogger instead
        return function ($app) {
            return new NullLogger();
        };
    }
public function validate ( $ logger ) { $ original = $ logger ; if ( is_callable ( $ logger ) ) { $ logger = $ logger ( $ this -> container ) ; } // Check if logger is an instance of the PSR-3 logger interface if ( $ logger instanceof LoggerInterface ) { return $ original ; } // A PSR-3 compatible log writer hasn't been configured so we don't know if it is // compatible with Phapi. Therefore we create an instance of the NullLogger instead return function ( $ app ) { return new NullLogger ( ) ; } ; }
Validates the configured logger. If no logger is configured or if the configured
logger isn't PSR-3 compliant an instance of NullLogger will be used instead.

The PSR-3 package includes a NullLogger that does not do anything with
the input but it also prevents the application from failing.

This simplifies the development since we don't have to check if there
actually are a valid cache to use. We can just ask the Cache (even
if its a NullCache) and we will get a response.

@param $logger
@return callable
Validates the configured logger . If no logger is configured or if the configured logger isn t PSR - 3 compliant an instance of NullLogger will be used instead .