Core/(Logs|Cache) -> Site

This commit is contained in:
2022-12-04 13:21:40 +01:00
parent b1059717c7
commit 87f7b44010
12 changed files with 11 additions and 15 deletions

View File

@@ -82,7 +82,7 @@ class Logger {
$module = preg_replace("/[^a-zA-Z0-9-]/", "-", $this->module);
$date = (\DateTime::createFromFormat('U.u', microtime(true)))->format(self::LOG_FILE_DATE_FORMAT);
$logFile = implode("_", [$module, $severity, $date]) . ".log";
$logPath = implode(DIRECTORY_SEPARATOR, [WEBROOT, "Core", "Logs", $logFile]);
$logPath = implode(DIRECTORY_SEPARATOR, [WEBROOT, "Site", "Logs", $logFile]);
@file_put_contents($logPath, $message);
}
@@ -130,7 +130,7 @@ class Logger {
/**
* Calling this method will prevent the logger from persisting log messages (writing to database/file),
*/
public function unitTestMode() {
public function unitTestMode(): void {
$this->unitTestMode = true;
}
}