34 protected $rotation_index;
35 protected $total_size;
48 $this->logname = $logname;
49 $this->rotation_index = $rotation_index;
51 $log_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'log_manager');
52 $this->total_size = $log_manager->getLogSize($this->logname, $this->rotation_index);
54 if (empty($this->total_size)) {
55 $this->total_size = 0;
71 if ($this->offset < $this->total_size) {
72 $log_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'log_manager');
73 $line =& $log_manager->getLogLine($this->logname, $this->rotation_index, $this->offset);
74 $line_offset = array_get_index($line,
'offset', FALSE);
76 if ($line_offset != FALSE && $line_offset >= 0) {
77 $this->offset = $line_offset;
80 return array_get_index($line,
'line', FALSE);
128 'current' => $this->offset,
129 'total' => $this->total_size,