|
SeasLog::analyzerCountGet log count by level, log_path and key_word 説明
public static mixed SeasLog::analyzerCount(string
$level , string $log_path = ?, string $key_word = ?)`SeasLog` get count value of `grep -ai '{level}' | grep -aic '{key_word}'` use system pipe and return to PHP (array or int). パラメータ
戻り値If `level` is SEASLOG_ALL or Empty, return all levels count as `array`. If `level` is SEASLOG_INFO or the other level, return count as `int`. 例例1 SeasLog::analyzerCount example
上の例の出力は、 たとえば以下のようになります。 array(8) { ["DEBUG"]=> int(180) ["INFO"]=> int(214) ["NOTICE"]=> int(0) ["WARNING"]=> int(0) ["ERROR"]=> int(228) ["CRITICAL"]=> int(244) ["ALERT"]=> int(1) ["EMERGENCY"]=> int(0) } int(180) int(228) int(29) 参考
|