diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-06 17:29:45 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-11 19:38:56 -0400 |
commit | 71491612e3718444617e301bf616a1db903c8573 (patch) | |
tree | 54e739bc5ed326045cc9ff5d9341c9329d352855 /lib/log/owncloud.php | |
parent | bc3462f022bd564ff26811a9a47a2c17393d655d (diff) | |
download | nextcloud-server-71491612e3718444617e301bf616a1db903c8573.tar.gz nextcloud-server-71491612e3718444617e301bf616a1db903c8573.zip |
Move line counter so we only count lines towards the offset that are equal or above the log level
Diffstat (limited to 'lib/log/owncloud.php')
-rw-r--r-- | lib/log/owncloud.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 42ae7867ff0..9eb21832c55 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -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 = ''; } |