source: branches/1.2/workflow/inc/log/tests/composite.phpt @ 1349

Revision 1349, 810 bytes checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1--TEST--
2Log: Composite Handler
3--FILE--
4<?php
5
6require_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$composite->setIdent('IDENT');
19echo $composite->getIdent() . "\n";
20
21$composite->log('This event will be logged to both handlers.');
22
23--EXPECT--
24CONSOLE1 [info] This event will be logged to both handlers.
25CONSOLE2 [info] This event will be logged to both handlers.
26IDENT
27IDENT [info] This event will be logged to both handlers.
28IDENT [info] This event will be logged to both handlers.
Note: See TracBrowser for help on using the repository browser.