mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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
1 changed files with 6 additions and 4 deletions
|
|
@ -80,12 +80,14 @@ 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) {
|
||||
$entries[] = $entry;
|
||||
$entriesCount++;
|
||||
if ($entry->level >= $minLevel) {
|
||||
$lines++;
|
||||
if ($lines > $offset) {
|
||||
$entries[] = $entry;
|
||||
$entriesCount++;
|
||||
}
|
||||
}
|
||||
$line = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue