We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 sample.php 中的 getLogs 方法,将其中的 query 的为 " query | timeslice 24h | count " 时会有 notice
PHP Notice: Undefined index: source in ******/aliyun-log-php-sdk/Aliyun/Log/Models/Response/GetLogsResponse.php on line 48
sample/sample.php 文件改造如下:
58 function getLogs(Aliyun_Log_Client $client, $project, $logstore) { 59 // $topic = 'TestTopic'; 60 $topic = ''; 61 $from = time()-86400; 62 $to = time(); 63 $query = 'type:adc | timeslice 12h | count'; 64 // $query = ''; 65 $request = new Aliyun_Log_Models_GetLogsRequest($project, $logstore, $from, $to, $topic, $query, 100, 0, False); 66 67 try { 68 $response = $client->getLogs($request); 69 foreach($response -> getLogs() as $log) 70 { 71 print $log -> getTime()."\t"; 72 foreach($log -> getContents() as $key => $value){ 73 print $key.":".$value."\t"; 74 } 75 print "\n"; 76 } 77 78 } catch (Aliyun_Log_Exception $ex) { 79 logVarDump($ex); 80 } catch (Exception $ex) { 81 logVarDump($ex); 82 } 83 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用 sample.php 中的 getLogs 方法,将其中的 query 的为 " query | timeslice 24h | count " 时会有 notice
PHP Notice: Undefined index: source in ******/aliyun-log-php-sdk/Aliyun/Log/Models/Response/GetLogsResponse.php on line 48
sample/sample.php 文件改造如下:
The text was updated successfully, but these errors were encountered: