Pusher::set_logger PHP Method

set_logger() public method

Set a logger to be informed of internal log messages.
public set_logger ( $logger )
    public function set_logger($logger)
    {
        $this->logger = $logger;
    }

Usage Example

 public function testEncryptedPush()
 {
     $options = array('encrypted' => true, 'host' => PUSHERAPP_HOST);
     $pusher = new Pusher(PUSHERAPP_AUTHKEY, PUSHERAPP_SECRET, PUSHERAPP_APPID, $options);
     $pusher->set_logger(new TestLogger());
     $batch = array();
     $batch[] = array('channel' => 'test_channel', 'name' => 'my_event', 'data' => array('my' => 'data'));
     $string_trigger = $this->pusher->triggerBatch($batch);
     $this->assertTrue($string_trigger, 'Trigger with string payload');
 }
All Usage Examples Of Pusher::set_logger