small loggin fixes
This commit is contained in:
parent
49256a3522
commit
d6935482e6
3 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -24,3 +24,4 @@ storage/app/public/logo.png
|
||||||
- Kopie.env
|
- Kopie.env
|
||||||
public/install/logs.txt
|
public/install/logs.txt
|
||||||
install.lock
|
install.lock
|
||||||
|
public/install/logs/installer.log
|
||||||
|
|
|
@ -84,7 +84,7 @@ if (isset($_POST['feedDB'])) {
|
||||||
if (strpos(getEnvironmentValue("APP_KEY"), 'base64') !== false) {
|
if (strpos(getEnvironmentValue("APP_KEY"), 'base64') !== false) {
|
||||||
header("LOCATION: index.php?step=3");
|
header("LOCATION: index.php?step=3");
|
||||||
} else {
|
} 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 !");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -130,12 +130,12 @@ function run_console($command)
|
||||||
|
|
||||||
function wh_log($log_msg)
|
function wh_log($log_msg)
|
||||||
{
|
{
|
||||||
$log_filename = "log";
|
$log_filename = "logs";
|
||||||
if (!file_exists($log_filename)) {
|
if (!file_exists($log_filename)) {
|
||||||
// create directory/folder uploads.
|
// create directory/folder uploads.
|
||||||
mkdir($log_filename, 0777, true);
|
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
|
// 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);
|
file_put_contents($log_file_data, "[" . date('h:i:s') . "] " . $log_msg . "\n", FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue