Author: sb Date: Tue Nov 27 17:56:16 2007 New Revision: 6843 Log: - Add tutorial for #12083.
Added: trunk/WorkflowEventLogTiein/docs/example.php - copied, changed from r6841, trunk/WorkflowDatabaseTiein/docs/example_execute.php trunk/WorkflowEventLogTiein/docs/tutorial.txt (with props) Copied: trunk/WorkflowEventLogTiein/docs/example.php (from r6841, trunk/WorkflowDatabaseTiein/docs/example_execute.php) ============================================================================== --- trunk/WorkflowDatabaseTiein/docs/example_execute.php [iso-8859-1] (original) +++ trunk/WorkflowEventLogTiein/docs/example.php [iso-8859-1] Tue Nov 27 17:56:16 2007 @@ -1,4 +1,15 @@ <?php +// Set up the logfile writer. +$writer = new ezcLogUnixFileWriter( + dirname( __FILE__ ) . '/data', 'actual.log' +); + +$log = ezcLog::getInstance(); +$mapper = $log->getMapper(); +$filter = new ezcLogFilter; +$rule = new ezcLogFilterRule( $filter, $writer, true ); +$mapper->appendRule( $rule ); + // Set up database connection. $db = ezcDbFactory::create( 'mysql://[EMAIL PROTECTED]/test' ); @@ -14,6 +25,9 @@ // Pass workflow object to workflow executer. $execution->workflow = $workflow; +// Attach logfile writer as a listener. +$execution->addListener( new ezcWorkflowEventLogListener( $log ) ); + // Start workflow execution. $id = $execution->start(); ?> Added: trunk/WorkflowEventLogTiein/docs/tutorial.txt ============================================================================== --- trunk/WorkflowEventLogTiein/docs/tutorial.txt (added) +++ trunk/WorkflowEventLogTiein/docs/tutorial.txt [iso-8859-1] Tue Nov 27 17:56:16 2007 @@ -1,0 +1,42 @@ +eZ Components - WorkflowEventLogTiein +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. contents:: Table of Contents + + +Introduction +============ + +The WorkflowEventLogTiein component allows you to log workflow execution into +files or other storage spaces in different formats using the EventLog +component. + +Class overview +============== + +ezcWorkflowEventLogListener + Wrapper for ezcLog that logs workflow events. + + +Usage +===== + +Log workflow execution to a file +-------------------------------- + +This example shows how to log workflow execution into a file. + +.. include:: example.php + :literal: + +For more information on using the `EventLog`_ component please refer to its +documentation. + +.. _EventLog: introduction_EventLog.html + +.. + Local Variables: + mode: rst + fill-column: 79 + End: + vim: et syn=rst tw=79 Propchange: trunk/WorkflowEventLogTiein/docs/tutorial.txt ------------------------------------------------------------------------------ svn:eol-style = native -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components