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
90e4af312a
commit
f955e5e9b2
|
@ -80,13 +80,15 @@ class OC_Log_Owncloud {
|
|||
if ($pos == 0) {
|
||||
$line = $ch.$line;
|
||||
}
|
||||
$lines++;
|
||||
$entry = json_decode($line);
|
||||
// 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) {
|
||||
$lines++;
|
||||
if ($lines > $offset) {
|
||||
$entries[] = $entry;
|
||||
$entriesCount++;
|
||||
}
|
||||
}
|
||||
$line = '';
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue