|
SeasLog::analyzerDetailGet log detail by level, log_path, key_word, start, limit, order 説明
public static mixed SeasLog::analyzerDetail(
string $level ,string $log_path = ?,string $key_word = ?,int $start = ?,int $limit = ?,int $order = ?) `SeasLog` get results of `grep -ai '{level}' | grep -ai '{key_word}' | sed -n '{start},{limit}'p` use system pipe and return array to PHP. パラメータ
戻り値Return results as array.
例例1 SeasLog::analyzerDetail example
上の例の出力は、 たとえば以下のようになります。 array(20) { [0]=> string(93) "2018-07-09 12:52:53 | ERROR | 12247 | 5b42ea2580e51 | 1531111973.528 | log message from neeke" [1]=> string(93) "2018-07-09 12:52:54 | ERROR | 12256 | 5b42ea26d6657 | 1531111974.878 | log message from neeke" [2]=> string(93) "2018-07-09 12:52:55 | ERROR | 12265 | 5b42ea277b8d4 | 1531111975.506 | log message from neeke" [3]=> string(104) "2018-07-09 12:52:55 | ERROR | 12274 | 5b42ea27db5dc | 1531111975.898 | log message from the other people" ... } array(3) { [0]=> string(93) "2018-07-09 12:52:53 | ERROR | 12247 | 5b42ea2580e51 | 1531111973.528 | log message from neeke" [1]=> string(93) "2018-07-09 12:52:54 | ERROR | 12256 | 5b42ea26d6657 | 1531111974.878 | log message from neeke" [2]=> string(93) "2018-07-09 12:52:55 | ERROR | 12265 | 5b42ea277b8d4 | 1531111975.506 | log message from neeke" } array(2) { [0]=> string(93) "2018-07-09 12:52:53 | ERROR | 12247 | 5b42ea2580e51 | 1531111973.528 | log message from neeke" [1]=> string(93) "2018-07-09 12:52:54 | ERROR | 12256 | 5b42ea26d6657 | 1531111974.878 | log message from neeke" } 参考
|