Move line counter so we only count lines towards the offset that are equal or above the log level
This commit is contained in:
parent
bc3462f022
commit
71491612e3
|
@ -80,12 +80,14 @@ class OC_Log_Owncloud {
|
||||||
if ($pos == 0) {
|
if ($pos == 0) {
|
||||||
$line = $ch.$line;
|
$line = $ch.$line;
|
||||||
}
|
}
|
||||||
$lines++;
|
|
||||||
$entry = json_decode($line);
|
$entry = json_decode($line);
|
||||||
// Add the line as an entry if it is passed the offset and is equal or above the log level
|
// Add the line as an entry if it is passed the offset and is equal or above the log level
|
||||||
if ($lines > $offset && $entry->level >= $minLevel) {
|
if ($entry->level >= $minLevel) {
|
||||||
$entries[] = $entry;
|
$lines++;
|
||||||
$entriesCount++;
|
if ($lines > $offset) {
|
||||||
|
$entries[] = $entry;
|
||||||
|
$entriesCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$line = '';
|
$line = '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue