summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-01-21 14:30:25 +0100
committerAndrey Andreev <narf@bofh.bg>2013-01-21 14:30:25 +0100
commit9f690f190f1aa503dfc6270e3a97d96196ae3cff (patch)
tree10008234cd8db0ac53cf4c92fba09f75f678a1fa
parent3ffce987e0d7efa68bbce2d83915b06e97bd3475 (diff)
Partially implement PR #2155
-rw-r--r--system/core/Log.php2
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 3 insertions, 0 deletions
diff --git a/system/core/Log.php b/system/core/Log.php
index 9dabfe6f2..cd3c17e1e 100644
--- a/system/core/Log.php
+++ b/system/core/Log.php
@@ -97,6 +97,8 @@ class CI_Log {
$this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/';
+ file_exists($this->_log_path) OR mkdir($this->_log_path, DIR_WRITE_MODE, TRUE);
+
if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path))
{
$this->_enabled = FALSE;
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 989999929..f6dad07b3 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -321,6 +321,7 @@ Release Date: Not Released
- Changed method ``load()`` to filter the language name with ``ctype_digit()``.
- Added an optional second parameter to method ``line()`` to disable error login for line keys that were not found.
- Language files are now loaded in a cascading style with the one in **system/** always loaded and overriden afterwards, if another one is found.
+ - Log Library will now try to create the **log_path** directory if it doesn't exist.
Bug fixes for 3.0
------------------