From d6935482e68150fb60aff01aa4e40d5a9f0ebcde Mon Sep 17 00:00:00 2001 From: 1Day Date: Tue, 15 Feb 2022 16:05:46 +0100 Subject: [PATCH] small loggin fixes --- .gitignore | 1 + public/install/forms.php | 2 +- public/install/functions.php | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 89374ea7..a05f6264 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ storage/app/public/logo.png - Kopie.env public/install/logs.txt install.lock +public/install/logs/installer.log diff --git a/public/install/forms.php b/public/install/forms.php index 732cf4a5..60546f05 100644 --- a/public/install/forms.php +++ b/public/install/forms.php @@ -84,7 +84,7 @@ if (isset($_POST['feedDB'])) { if (strpos(getEnvironmentValue("APP_KEY"), 'base64') !== false) { header("LOCATION: index.php?step=3"); } else { - header("LOCATION: index.php?step=2.5&message=There was an error. Please check the .txt file in install/log !"); + header("LOCATION: index.php?step=2.5&message=There was an error. Please check the .txt file in /var/www/controlpanel/public/install/logs !"); } diff --git a/public/install/functions.php b/public/install/functions.php index c795aee0..82df4017 100644 --- a/public/install/functions.php +++ b/public/install/functions.php @@ -130,12 +130,12 @@ function run_console($command) function wh_log($log_msg) { - $log_filename = "log"; + $log_filename = "logs"; if (!file_exists($log_filename)) { // create directory/folder uploads. mkdir($log_filename, 0777, true); } - $log_file_data = $log_filename . '/log_' . date('d-M-Y') . '.log'; + $log_file_data = $log_filename . '/installer.log'; // if you don't add `FILE_APPEND`, the file will be erased each time you add a log file_put_contents($log_file_data, "[" . date('h:i:s') . "] " . $log_msg . "\n", FILE_APPEND); }