mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-08 05:18:40 +00:00
Fix bad log lines
This commit is contained in:
parent
dbdce97904
commit
2b81ab274b
|
|
@ -393,8 +393,13 @@ final class FileLogger implements LoggerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
\fseek($this->fp, 0);
|
\fseek($this->fp, 0);
|
||||||
|
$line = \fgetcsv($this->fp, 0, ';');
|
||||||
|
|
||||||
|
while ($line !== false && $line !== null) {
|
||||||
|
if (count($line) < 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
while (($line = \fgetcsv($this->fp, 0, ';')) !== false) {
|
|
||||||
$line[1] = trim($line[1]);
|
$line[1] = trim($line[1]);
|
||||||
|
|
||||||
if (!isset($levels[$line[1]])) {
|
if (!isset($levels[$line[1]])) {
|
||||||
|
|
@ -402,6 +407,7 @@ final class FileLogger implements LoggerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$levels[$line[1]]++;
|
$levels[$line[1]]++;
|
||||||
|
$line = \fgetcsv($this->fp, 0, ';');
|
||||||
}
|
}
|
||||||
|
|
||||||
\fseek($this->fp, 0, SEEK_END);
|
\fseek($this->fp, 0, SEEK_END);
|
||||||
|
|
@ -434,8 +440,13 @@ final class FileLogger implements LoggerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
\fseek($this->fp, 0);
|
\fseek($this->fp, 0);
|
||||||
|
$line = \fgetcsv($this->fp, 0, ';');
|
||||||
|
|
||||||
|
while ($line !== false && $line !== null) {
|
||||||
|
if (count($line) < 3) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
while (($line = \fgetcsv($this->fp, 0, ';')) !== false) {
|
|
||||||
$line[2] = trim($line[2]);
|
$line[2] = trim($line[2]);
|
||||||
|
|
||||||
if (!isset($connection[$line[2]])) {
|
if (!isset($connection[$line[2]])) {
|
||||||
|
|
@ -443,6 +454,7 @@ final class FileLogger implements LoggerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$connection[$line[2]]++;
|
$connection[$line[2]]++;
|
||||||
|
$line = \fgetcsv($this->fp, 0, ';');
|
||||||
}
|
}
|
||||||
|
|
||||||
\fseek($this->fp, 0, SEEK_END);
|
\fseek($this->fp, 0, SEEK_END);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user