small logging fixes

small loggin fixes
This commit is contained in:
Dennis 2022-02-15 16:06:04 +01:00 committed by GitHub
commit baeaf9e456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

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

View file

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

View file

@ -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);
}