Skip to content
Snippets Groups Projects
Commit 71491612 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Move line counter so we only count lines towards the offset that are equal or above the log level

parent bc3462f0
No related branches found
No related tags found
No related merge requests found
......@@ -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 = '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment