summaryrefslogtreecommitdiff
path: root/framework/Log/ILog.php
diff options
context:
space:
mode:
authorxue <>2006-01-08 18:13:02 +0000
committerxue <>2006-01-08 18:13:02 +0000
commit09596d92b2eea0f70c98cc5abca6f5dbd4629802 (patch)
tree3e1c656d18ee46510bd76033e7b36ca2bd4dc05d /framework/Log/ILog.php
parent4a2c7c4e9ac75c1420e95624fb9ee34ab178c52f (diff)
Completed TLogger, TLogRouter, TFileLogRoute, TEmailLogRoute
Diffstat (limited to 'framework/Log/ILog.php')
-rw-r--r--framework/Log/ILog.php76
1 files changed, 0 insertions, 76 deletions
diff --git a/framework/Log/ILog.php b/framework/Log/ILog.php
deleted file mode 100644
index 90239e97..00000000
--- a/framework/Log/ILog.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
-interface ILog
-{
- public function info($msg, $source='Prado', $category='core');
- public function debug($msg, $source='Prado', $category='core');
- public function notice($msg, $source='Prado', $category='core');
- public function warn($msg, $source='Prado', $category='core');
- public function error($msg, $source='Prado', $category='core');
- public function fatal($msg, $source='Prado', $category='core');
-}
-
-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}
- *
- * ${description}
- *
- * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
- * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
- * @package ${package}
- */
-class TInternalLogger
-{
- public $entries = array();
-
- public function info($msg, $source='Prado', $category='core')
- {
- $this->log($msg, ezcLog::INFO,
- array('source'=>$source, 'category'=>$category));
- }
- public function debug($msg, $source='Prado', $category='core')
- {
- $this->log($msg, ezcLog::DEBUG,
- array('source'=>$source, 'category'=>$category));
- }
- public function notice($msg, $source='Prado', $category='core')
- {
- $this->log($msg, ezcLog::NOTICE,
- array('source'=>$source, 'category'=>$category));
- }
-
- public function warn($msg, $source='Prado', $category='core')
- {
- $this->log($msg, ezcLog::WARNING,
- array('source'=>$source, 'category'=>$category));
- }
-
- public function error($msg, $source='Prado', $category='core')
- {
- $this->log($msg, ezcLog::ERROR,
- array('source'=>$source, 'category'=>$category));
- }
-
- public function fatal($msg, $source='Prado', $category='core')
- {
- $this->log($msg, ezcLog::FATAL,
- array('source'=>$source, 'category'=>$category));
- }
-
- protected function log($msg, $type, $info)
- {
- if($info['category']=='core')
- {
- $trace = debug_backtrace();
- $info['category'] = $trace[3]['class'];
- }
- $info['time'] = microtime(true);
- $this->entries[] = array($msg, $type, $info);
- }
-}
-
-?> \ No newline at end of file