Explorar o código

small loggin fixes

1Day %!s(int64=3) %!d(string=hai) anos
pai
achega
d6935482e6
Modificáronse 3 ficheiros con 4 adicións e 3 borrados
  1. 1 0
      .gitignore
  2. 1 1
      public/install/forms.php
  3. 2 2
      public/install/functions.php

+ 1 - 0
.gitignore

@@ -24,3 +24,4 @@ storage/app/public/logo.png
  - Kopie.env
 public/install/logs.txt
 install.lock
+public/install/logs/installer.log

+ 1 - 1
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 !");
     }
 
 

+ 2 - 2
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);
 }