(PECL seaslog >=1.0.0)
SeasLog::setRequestID — 設定 SeasLog request_id 區分請求
為了區分單個請求,例如未呼叫 SeasLog::setRequestId() 函式,在請求初始化時會使用內建 `static char *get_uniqid ()` 函式產生的唯一值。
request_id
字串。
設定 request_id 成功時回傳 TRUE,失敗時回傳 FALSE。
範例 #1 SeasLog::setRequestID() 範例
<?php
var_dump(SeasLog::setRequestID(time() . rand()));
?>
上述範例將輸出類似以下的內容
bool(true)