fix: use PHP_EOL for carriage returns in file logs
Relates to #436 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
122d90ef8d
commit
aa7f7b3ea6
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ function logm($logFile, $clientIp, $message)
|
||||||
{
|
{
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
$logFile,
|
$logFile,
|
||||||
date('Y/m/d H:i:s').' - '.$clientIp.' - '.strval($message).'\n',
|
date('Y/m/d H:i:s').' - '.$clientIp.' - '.strval($message).PHP_EOL,
|
||||||
FILE_APPEND
|
FILE_APPEND
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ protected function setUp()
|
||||||
protected function getLastLogEntry()
|
protected function getLastLogEntry()
|
||||||
{
|
{
|
||||||
$logFile = file(self::$testLogFile);
|
$logFile = file(self::$testLogFile);
|
||||||
return explode(' - ', trim(array_pop($logFile), '\n'));
|
return explode(' - ', trim(array_pop($logFile), PHP_EOL));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue