From 761d044957fcb69263b258841b16cf45d0d485b8 Mon Sep 17 00:00:00 2001 From: AGuyNamedJens Date: Thu, 30 Mar 2023 22:29:58 +0200 Subject: [PATCH] (refactor) actually fix the checkHttps log (refactor) change logger output to controlpanel.log (refactor) add and fix extension logs --- public/install/functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/install/functions.php b/public/install/functions.php index a5e6eecf..9f071583 100644 --- a/public/install/functions.php +++ b/public/install/functions.php @@ -47,7 +47,7 @@ function checkWriteable(): bool function checkHTTPS(): bool { $isHttps = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; - wh_log('https: ' . $isHttps, 'debug'); + wh_log('https:', 'debug', (array)$isHttps); return $isHttps; } @@ -137,7 +137,8 @@ function checkExtensions(): array } } - wh_log('extensions: ' . implode(', ', $not_ok), 'debug'); + wh_log('loaded extensions:', 'debug', $extentions); + wh_log('failed extensions:', 'debug', $not_ok); return $not_ok; } @@ -258,7 +259,7 @@ function run_console(string $command, array $descriptors = null, string $cwd = n function wh_log(string $message, string $level = 'info', array $context = []): void { $formatter = new LineFormatter(null, null, true, true); - $stream = new StreamHandler(dirname(__FILE__, 3) . '/storage/logs/laravel.log', Logger::DEBUG); + $stream = new StreamHandler(dirname(__FILE__, 3) . '/storage/logs/controlpanel.log', Logger::DEBUG); $stream->setFormatter($formatter); $log = new Logger('ControlPanel');