public static function register(LoggerInterface $logger = null)
    {
        $handler = new static($logger);

        set_error_handler(array($handler, 'handleError'));
        register_shutdown_function(array($handler, 'handleFatalError'));

        set_exception_handler(array($handler, 'handleException'));
    }
public static function register(LoggerInterface $logger = null)
    {
        $handler = new static($logger);

        set_error_handler(array($handler, 'handleError'));
        register_shutdown_function(array($handler, 'handleFatalError'));

        set_exception_handler(array($handler, 'handleException'));
    }
public static function register ( LoggerInterface $ logger = null ) { $ handler = new static ( $ logger ) ; set_error_handler ( array ( $ handler , 'handleError' ) ) ; register_shutdown_function ( array ( $ handler , 'handleFatalError' ) ) ; set_exception_handler ( array ( $ handler , 'handleException' ) ) ; }
Register a new log handler.
@param LoggerInterface $logger
Register a new log handler .