diff options
Diffstat (limited to 'framework/Log')
-rw-r--r-- | framework/Log/ILog.php | 2 | ||||
-rw-r--r-- | framework/Log/TLogManager.php | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/framework/Log/ILog.php b/framework/Log/ILog.php index faeb4ff3..90239e97 100644 --- a/framework/Log/ILog.php +++ b/framework/Log/ILog.php @@ -12,6 +12,8 @@ interface ILog require_once(PRADO_DIR.'/Log/EventLog/log.php');
require_once(PRADO_DIR.'/Log/EventLog/exceptions/writer_exception.php');
+require_once(PRADO_DIR.'/Log/EventLog/exceptions/file_exception.php');
+
/**
* ${classname}
*
diff --git a/framework/Log/TLogManager.php b/framework/Log/TLogManager.php index 8ab170ed..dd926bc7 100644 --- a/framework/Log/TLogManager.php +++ b/framework/Log/TLogManager.php @@ -110,6 +110,10 @@ class TEzcLoggerUnixFileWriterFactory $path = $xml->getAttribute('directory');
$dir = Prado::getPathOfNamespace($path);
+ if(!is_dir($dir))
+ throw new TException("missing_logging_directory $dir");
+ if(!is_writable($dir))
+ throw new TException("unable_to_writer_to $dir");
$file = $xml->getAttribute('filename');
if(empty($file)) $file = 'prado.log';
return new ezcLogWriterUnixFile($dir, $file);
|