示例#1
0
 public function testCaptureException()
 {
     $client = Logriver_Client::init('12345baced3340aa940fc402e652d30d');
     $client->setDebugMode();
     $client->startListener();
     Logriver_Client::captureException('test exception');
     $model = $client->getDebugModel();
     $this->assertEquals($model->type, 4);
     $this->assertEquals(basename($model->file), 'ClientTest.php');
     $this->assertTrue(is_int($model->line));
     $this->assertTrue(is_double($model->mt));
     $this->assertTrue(is_string($model->m));
     $this->assertTrue(is_double($model->st));
     $this->assertEquals($model->message, 'test exception');
     $this->assertEquals($model->ct, 256);
     $this->assertEquals($model->cat, 2);
     $this->assertTrue(is_array($model->ds));
     $this->assertTrue(is_array($model->t));
     $this->assertEquals(count($model->t), 8);
     $this->assertNull($model->md);
 }
示例#2
0
function Logriver_captureException($message)
{
    Logriver_Client::captureException($message);
}