home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / composite.phpt < prev    next >
Encoding:
Text File  |  2004-03-24  |  557 b   |  21 lines

  1. --TEST--
  2. Log: Composite Handler
  3. --FILE--
  4. <?php
  5.  
  6. require_once 'Log.php';
  7.  
  8. $conf = array('lineFormat' => '%2$s [%3$s] %4$s');
  9. $console1 = &Log::singleton('console', '', 'CONSOLE1', $conf);
  10. $console2 = &Log::singleton('console', '', 'CONSOLE2', $conf);
  11.  
  12. $composite = &Log::singleton('composite');
  13. $composite->addChild($console1);
  14. $composite->addChild($console2);
  15.  
  16. $composite->log('This event will be logged to both handlers.');
  17.  
  18. --EXPECT--
  19. CONSOLE1 [info] This event will be logged to both handlers.
  20. CONSOLE2 [info] This event will be logged to both handlers.
  21.