Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit dbc862e784b6189f2c5effb21e7827930fa18a1a 1 parent 938bf14
@drzax drzax authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  dev/LogFileWriter.php
View
1  dev/LogFileWriter.php
@@ -58,6 +58,7 @@ public function _write($event) {
$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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.