in sample/sample.php [58:80]
function getLogs(Aliyun_Log_Client $client, $project, $logstore) {
$topic = 'TestTopic';
$from = time()-3600;
$to = time();
$request = new Aliyun_Log_Models_GetLogsRequest($project, $logstore, $from, $to, $topic, '', 100, 0, False);
try {
$response = $client->getLogs($request);
foreach($response -> getLogs() as $log)
{
print $log -> getTime()."\t";
foreach($log -> getContents() as $key => $value){
print $key.":".$value."\t";
}
print "\n";
}
} catch (Aliyun_Log_Exception $ex) {
logVarDump($ex);
} catch (Exception $ex) {
logVarDump($ex);
}
}