mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 05:39:10 +02:00
BUG Attempt to create log path before writing file
Attempt to create the path a log file will be written to before blindly attempting to write the file. This makes dynamically named log paths (i.e. rotation by date) possible.
This commit is contained in:
parent
938bf14d16
commit
dbc862e784
@ -58,6 +58,7 @@ class SS_LogFileWriter extends Zend_Log_Writer_Abstract {
|
||||
$this->setFormatter($formatter);
|
||||
}
|
||||
$message = $this->_formatter->format($event);
|
||||
if(!file_exists(dirname($this->path))) mkdir(dirname($this->path), 0755, true);
|
||||
error_log($message, $this->messageType, $this->path, $this->extraHeaders);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user