public function setLogger(ApnsPHP_Log_Interface $logger)
	{
		if (!is_object($logger)) {
			throw new ApnsPHP_Exception(
				"The logger should be an instance of 'ApnsPHP_Log_Interface'"
			);
		}
		if (!($logger instanceof ApnsPHP_Log_Interface)) {
			throw new ApnsPHP_Exception(
				"Unable to use an instance of '" . get_class($logger) . "' as logger: " .
				"a logger must implements ApnsPHP_Log_Interface."
			);
		}
		$this->_logger = $logger;
	}
public function setLogger(ApnsPHP_Log_Interface $logger)
	{
		if (!is_object($logger)) {
			throw new ApnsPHP_Exception(
				"The logger should be an instance of 'ApnsPHP_Log_Interface'"
			);
		}
		if (!($logger instanceof ApnsPHP_Log_Interface)) {
			throw new ApnsPHP_Exception(
				"Unable to use an instance of '" . get_class($logger) . "' as logger: " .
				"a logger must implements ApnsPHP_Log_Interface."
			);
		}
		$this->_logger = $logger;
	}
public function setLogger ( ApnsPHP_Log_Interface $ logger ) { if ( ! is_object ( $ logger ) ) { throw new ApnsPHP_Exception ( "The logger should be an instance of 'ApnsPHP_Log_Interface'" ) ; } if ( ! ( $ logger instanceof ApnsPHP_Log_Interface ) ) { throw new ApnsPHP_Exception ( "Unable to use an instance of '" . get_class ( $ logger ) . "' as logger: " . "a logger must implements ApnsPHP_Log_Interface." ) ; } $ this -> _logger = $ logger ; }
Set the Logger instance to use for logging purpose.

The default logger is ApnsPHP_Log_Embedded, an instance
of ApnsPHP_Log_Interface that simply print to standard
output log messages.

To set a custom logger you have to implement ApnsPHP_Log_Interface
and use setLogger, otherwise standard logger will be used.

@see ApnsPHP_Log_Interface
@see ApnsPHP_Log_Embedded

@param  $logger @type ApnsPHP_Log_Interface Logger instance.
@throws ApnsPHP_Exception if Logger is not an instance
of ApnsPHP_Log_Interface.
Set the Logger instance to use for logging purpose .