From 333eedb6eea18fdfb7bc0890cce1c30e6d44d363 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 6 Jan 2006 22:21:07 +0000 Subject: --- framework/Log/ILog.php | 2 ++ framework/Log/TLogManager.php | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'framework/Log') 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); -- cgit v1.2.3