Fixed FileLogging issue by setting the write permission to 0666 for the log file if it doesn't exist.
This commit is contained in:
parent
49bb26a063
commit
dc9b831534
4 changed files with 15 additions and 9 deletions
|
@ -32,8 +32,11 @@
|
|||
// Create the file if it doesn't exist
|
||||
if (!file_exists($filePath))
|
||||
{
|
||||
$this->fileHandle = fopen($filePath, 'w');
|
||||
fclose($this->fileHandle);
|
||||
// Create the file
|
||||
touch($filePath);
|
||||
|
||||
// Set the file permissions to 0666
|
||||
chmod($filePath, 0666);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,6 @@ class FileLogging implements LogHandlerInterface
|
|||
*/
|
||||
public static function handle(Application $application, Event $event): void
|
||||
{
|
||||
// If we're running in a Web environment, return
|
||||
if(!Utilities::runningInCli())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!Validate::checkLevelType($event->getLevel(), $application->getFileLoggingLevel()))
|
||||
{
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue