summaryrefslogtreecommitdiff
path: root/framework/Log/EventLog/interfaces/writer.php
diff options
context:
space:
mode:
authorwei <>2006-01-04 08:10:56 +0000
committerwei <>2006-01-04 08:10:56 +0000
commit3628bfe141ef02299beb9514397cfc2c27a7dcb1 (patch)
treee1b09079bee418e45af6c49314a9f0fec5cf2012 /framework/Log/EventLog/interfaces/writer.php
parent0ebae0856a5ed24bcc1b01d13d8715288f39a08d (diff)
adding TEventLog using ezcLog from ezComponents.
Diffstat (limited to 'framework/Log/EventLog/interfaces/writer.php')
-rw-r--r--framework/Log/EventLog/interfaces/writer.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/framework/Log/EventLog/interfaces/writer.php b/framework/Log/EventLog/interfaces/writer.php
new file mode 100644
index 00000000..82481e36
--- /dev/null
+++ b/framework/Log/EventLog/interfaces/writer.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * File containing the ezcLogWriter interface.
+ *
+ * @package EventLog
+ * @version //autogentag//
+ * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * ezcLogWriter defines the common interface for all classes that implement
+ * their log writer.
+ *
+ * See the ezcLogFileWriter for an example of creating your own log writer.
+ *
+ * @package EventLog
+ * @version //autogentag//
+ */
+interface ezcLogWriter
+{
+ /**
+ * Writes the message $message to the log.
+ *
+ * The writer can use the severity, source, and category to filter the
+ * incoming messages and determine the location where the messages should
+ * be written.
+ *
+ * The array $optional contains extra information that can be added to the log. For example:
+ * line numbers, file names, usernames, etc.
+ *
+ * @throws ezcLogWriterException when the log writer was unable to write the log message.
+ *
+ * @param string $message
+ * @param int $severity
+ * ezcLog::DEBUG, ezcLog::SUCCES_AUDIT, ezcLog::FAIL_AUDIT, ezcLog::INFO, ezcLog::NOTICE,
+ * ezcLog::WARNING, ezcLog::ERROR or ezcLog::FATAL.
+ * $param string $source
+ * @param string $category
+ * @param array(string=>string) $optional
+ * @return void
+ */
+ public function writeLogMessage( $message, $severity, $source, $category, $optional = array() );
+}
+?>