Skip to content

Commit

Permalink
Merge pull request #3408 from mindscreen/bugfix-log-ip-separation
Browse files Browse the repository at this point in the history
BUGFIX: Always add space between IP and severity in file logs
  • Loading branch information
dlubitz authored Oct 29, 2024
2 parents 343fa16 + 7dd0209 commit 6476c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Neos.Flow.Log/Classes/Backend/FileBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat
} else {
$processId = ' ' . str_pad((string)getmypid(), 10);
}
$ipAddress = ($this->logIpAddress === true) ? str_pad(($_SERVER['REMOTE_ADDR'] ?? ''), 15) : '';
$ipAddress = ($this->logIpAddress === true) ? str_pad(($_SERVER['REMOTE_ADDR'] ?? ''), 15) . ' ' : '';
$severityLabel = $this->severityLabels[$severity] ?? 'UNKNOWN ';
$output = (new \DateTime())->format('y-m-d H:i:s') . $processId . ' ' . $ipAddress . $severityLabel . ' ' . str_pad((string)$packageKey, 20) . ' ' . $message;

Expand Down

0 comments on commit 6476c4d

Please sign in to comment.