예제 #1
0
 public function testCaptureMessage()
 {
     $client = Logriver_Client::init('12345baced3340aa940fc402e652d30d');
     $client->setDebugMode();
     $client->startListener();
     Logriver_Client::captureMessage('test message');
     $model = $client->getDebugModel();
     $this->assertEquals($model->type, 2);
     $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 message');
     $this->assertEquals($model->ct, 1024);
     $this->assertEquals($model->cat, 2);
     $this->assertTrue(is_array($model->ds));
     $this->assertNull($model->t);
     $this->assertNull($model->md);
 }
예제 #2
0
function Logriver_captureMessage($message)
{
    Logriver_Client::captureMessage($message);
}