verbesserungen

This commit is contained in:
2026-04-05 10:04:55 +02:00
parent 3e1fcf0535
commit a64e1a729f
2 changed files with 67 additions and 1 deletions
+48
View File
@@ -432,3 +432,51 @@
[Sun Apr 5 09:31:52 2026] 127.0.0.1:63903 Accepted [Sun Apr 5 09:31:52 2026] 127.0.0.1:63903 Accepted
[Sun Apr 5 09:32:56 2026] 127.0.0.1:63903 Closed without sending a request; it was probably just an unused speculative preconnection [Sun Apr 5 09:32:56 2026] 127.0.0.1:63903 Closed without sending a request; it was probably just an unused speculative preconnection
[Sun Apr 5 09:32:56 2026] 127.0.0.1:63903 Closing [Sun Apr 5 09:32:56 2026] 127.0.0.1:63903 Closing
[Sun Apr 5 09:43:44 2026] 127.0.0.1:64365 Accepted
[Sun Apr 5 09:43:44 2026] 127.0.0.1:64365 [200]: GET /tcrb_lightcurve.php?filters%5B%5D=V
[Sun Apr 5 09:43:44 2026] 127.0.0.1:64365 Closing
[Sun Apr 5 09:43:44 2026] 127.0.0.1:60114 Accepted
[Sun Apr 5 09:43:44 2026] 127.0.0.1:60114 [200]: GET /css/style.css
[Sun Apr 5 09:43:44 2026] 127.0.0.1:60114 Closing
[Sun Apr 5 09:43:44 2026] 127.0.0.1:59252 Accepted
[Sun Apr 5 09:43:44 2026] 127.0.0.1:61066 Accepted
[Sun Apr 5 09:43:44 2026] 127.0.0.1:59252 [200]: GET /images/star16x16.png
[Sun Apr 5 09:43:44 2026] 127.0.0.1:61066 [200]: GET /images/star16x16_rays.png
[Sun Apr 5 09:43:44 2026] 127.0.0.1:59252 Closing
[Sun Apr 5 09:43:44 2026] 127.0.0.1:61066 Closing
[Sun Apr 5 09:43:44 2026] 127.0.0.1:60677 Accepted
[Sun Apr 5 09:43:45 2026] 127.0.0.1:60677 [200]: GET /favicon.ico
[Sun Apr 5 09:43:45 2026] 127.0.0.1:60677 Closing
[Sun Apr 5 09:43:45 2026] 127.0.0.1:57931 Accepted
[Sun Apr 5 09:44:56 2026] 127.0.0.1:57931 Closed without sending a request; it was probably just an unused speculative preconnection
[Sun Apr 5 09:44:56 2026] 127.0.0.1:57931 Closing
[Sun Apr 5 09:52:02 2026] 127.0.0.1:55157 Accepted
[Sun Apr 5 09:52:02 2026] 127.0.0.1:55157 [200]: GET /admin_users.php
[Sun Apr 5 09:52:02 2026] 127.0.0.1:55157 Closing
[Sun Apr 5 09:52:02 2026] 127.0.0.1:65422 Accepted
[Sun Apr 5 09:52:02 2026] 127.0.0.1:65422 [200]: GET /css/style.css
[Sun Apr 5 09:52:02 2026] 127.0.0.1:65422 Closing
[Sun Apr 5 09:52:03 2026] 127.0.0.1:58737 Accepted
[Sun Apr 5 09:52:03 2026] 127.0.0.1:58737 [200]: GET /images/star16x16.png
[Sun Apr 5 09:52:03 2026] 127.0.0.1:58737 Closing
[Sun Apr 5 09:52:03 2026] 127.0.0.1:50158 Accepted
[Sun Apr 5 09:52:03 2026] 127.0.0.1:54322 Accepted
[Sun Apr 5 09:52:03 2026] 127.0.0.1:50158 [200]: GET /images/star16x16_rays.png
[Sun Apr 5 09:52:03 2026] 127.0.0.1:50158 Closing
[Sun Apr 5 09:52:03 2026] 127.0.0.1:54322 [200]: GET /favicon.ico
[Sun Apr 5 09:52:03 2026] 127.0.0.1:54322 Closing
[Sun Apr 5 09:52:05 2026] 127.0.0.1:55126 Accepted
[Sun Apr 5 09:52:06 2026] 127.0.0.1:55126 [200]: GET /settings.php
[Sun Apr 5 09:52:06 2026] 127.0.0.1:55126 Closing
[Sun Apr 5 09:52:06 2026] 127.0.0.1:54546 Accepted
[Sun Apr 5 09:52:06 2026] 127.0.0.1:54546 [200]: GET /css/style.css
[Sun Apr 5 09:52:06 2026] 127.0.0.1:54546 Closing
[Sun Apr 5 09:52:06 2026] 127.0.0.1:53320 Accepted
[Sun Apr 5 09:52:06 2026] 127.0.0.1:53320 [200]: GET /images/star16x16.png
[Sun Apr 5 09:52:06 2026] 127.0.0.1:53320 Closing
[Sun Apr 5 09:52:06 2026] 127.0.0.1:59734 Accepted
[Sun Apr 5 09:52:06 2026] 127.0.0.1:58998 Accepted
[Sun Apr 5 09:52:06 2026] 127.0.0.1:59734 [200]: GET /images/star16x16_rays.png
[Sun Apr 5 09:52:06 2026] 127.0.0.1:59734 Closing
[Sun Apr 5 09:52:07 2026] 127.0.0.1:58998 [200]: GET /favicon.ico
[Sun Apr 5 09:52:07 2026] 127.0.0.1:58998 Closing
+19 -1
View File
@@ -331,6 +331,24 @@ function isTaskDue(string $schedule, DateTimeImmutable $nowBerlin): bool
function writeMessage(string $message, bool $isError = false): void function writeMessage(string $message, bool $isError = false): void
{ {
$prefix = '[' . (new DateTimeImmutable('now'))->format('Y-m-d H:i:s') . '] '; $prefix = '[' . (new DateTimeImmutable('now'))->format('Y-m-d H:i:s') . '] ';
$stream = $isError ? STDERR : STDOUT; $defaultStream = $isError ? 'php://stderr' : 'php://stdout';
if ($isError && defined('STDERR')) {
fwrite(STDERR, $prefix . $message . PHP_EOL);
return;
}
if (!$isError && defined('STDOUT')) {
fwrite(STDOUT, $prefix . $message . PHP_EOL);
return;
}
$stream = @fopen($defaultStream, 'wb');
if ($stream === false) {
error_log($prefix . $message);
return;
}
fwrite($stream, $prefix . $message . PHP_EOL); fwrite($stream, $prefix . $message . PHP_EOL);
fclose($stream);
} }