Author: Raymond Bosman
Date: 2006-01-29 19:59:48 +0100 (Sun, 29 Jan 2006)
New Revision: 2092

Log:
- Updated inline documentation and the tutorial. 

Modified:
   packages/EventLog/trunk/docs/tutorial.txt
   packages/EventLog/trunk/src/log.php

Modified: packages/EventLog/trunk/docs/tutorial.txt
===================================================================
--- packages/EventLog/trunk/docs/tutorial.txt   2006-01-29 18:57:53 UTC (rev 
2091)
+++ packages/EventLog/trunk/docs/tutorial.txt   2006-01-29 18:59:48 UTC (rev 
2092)
@@ -22,8 +22,8 @@
 An incoming log message can be written to zero or more writers. The writers
 that write the log message depends on the variables of the log message itself 
and the
 ezcLogMapper implementation. An implementation of the ezcLogMapper checks the
-Severity, Source, and Category variables from the log message and sends the log
-message only to the writers that match with the log variables. 
+severity, source, and category from the log message and forwards the message 
+to the matching writers. 
 
 
 Class overview
@@ -48,8 +48,8 @@
   ezcLogFilterSet contains a set of ezcLogFilterRules. These rules are
   processed sequentially. The rule assigned first will be processed first.  
   Each rule determines whether the log message matches with the filter rule. 
If the
-  log message matches, it can executes the writer and decide whether it stops
-  processing.
+  log message matches, it calls the writer and decide whether the filter set
+  stops processing.
 
   The ezclogFilterSet is inspired by modern mail applications regarding the
   mail filter settings. Normally these mail filter settings sort the incoming
@@ -77,7 +77,6 @@
 Examples
 ========
 
-
 Writing a log message to a file.
 --------------------------------
 
@@ -189,6 +188,22 @@
   )
 
 
+Using trigger_error()
+---------------------
+
+The EventLog component is designed that it can be used with trigger_error_ or
+stand-alone. Instead of calling the ezcLog::getInstance()->log() method, the
+trigger_error can be called.  Using the trigger_error method makes your code
+less Log package dependent and produces less overhead when logging is disabled.
+ 
+The function set_error_handler_ should set up a callback function (or method)
+that in its turn calls the EventLog. See for more information the
+ezcLog::logHandler method.
+
+.. _trigger_error: http://www.php.net/trigger_error
+.. _set_error_handler: http://www.php.net/set_error_handler
+
+
 
 ..
    Local Variables:

Modified: packages/EventLog/trunk/src/log.php
===================================================================
--- packages/EventLog/trunk/src/log.php 2006-01-29 18:57:53 UTC (rev 2091)
+++ packages/EventLog/trunk/src/log.php 2006-01-29 18:59:48 UTC (rev 2092)
@@ -124,11 +124,11 @@
  * [EMAIL PROTECTED] setSeverityAttributes()} and [EMAIL PROTECTED] 
setSourceAttributes()} exist to append 
  * information automatically to the log message.
  *   
- * The ezcLog class provides a [EMAIL PROTECTED] trigger_error()} log handler: 
[EMAIL PROTECTED] ezcLog::LogHandler()}.
+ * The ezcLog class provides a [EMAIL PROTECTED] trigger_error()} log handler: 
[EMAIL PROTECTED] ezcLog::logHandler()}.
  * Using the trigger_error method makes your code less Log package dependent 
and 
  * produces less overhead when logging is disabled.
  *
- * See the [EMAIL PROTECTED] ezcLog::LogHandler()} method for more information 
about how to set up the 
+ * See the [EMAIL PROTECTED] ezcLog::logHandler()} method for more information 
about how to set up the 
  * trigger_error functionality. 
  *
  * See the [EMAIL PROTECTED] ezcDebug} package for more detailed information 
about writing DEBUG
@@ -396,7 +396,7 @@
      * The methods [EMAIL PROTECTED] setSeverityAttributes()} and [EMAIL 
PROTECTED] setSourceAttributes()} can automatically
      * add attributes to log messages based on, respectively, the severity and 
source.
      *
-     * See also [EMAIL PROTECTED] LogHandler()} on how to use [EMAIL 
PROTECTED] trigger_error()} to write log messages.
+     * See also [EMAIL PROTECTED] logHandler()} on how to use [EMAIL 
PROTECTED] trigger_error()} to write log messages.
      *
      * @throws ezcLogWriterException if [EMAIL PROTECTED] 
throwWriterExceptions} are enabled and a log entry 
      *                               could not be written. 
@@ -514,7 +514,7 @@
      * The following example creates manually an error handler and forwards 
the 
      * ERROR, WARNING and NOTICE severities. 
      * <code>
-     * public function MyLogHandler($errno, $errstr, $errfile, $errline)
+     * public function myLogHandler($errno, $errstr, $errfile, $errline)
      * {
      *     switch ($errno)
      *     {
@@ -533,8 +533,8 @@
      *     }
      * }
      * 
-     * // Register MyLogHandler
-     * set_error_handler( "MyLogHandler" );
+     * // Register myLogHandler
+     * set_error_handler( "myLogHandler" );
      *
      * // Write an warning to the log.
      * trigger_error( "[paynet, transaction] Didn't get a callback from the 
Paynet service", E_USER_WARNING );

-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to