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-- |
---|
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 | $composite->setIdent('IDENT'); |
---|
19 | echo $composite->getIdent() . "\n"; |
---|
20 | |
---|
21 | $composite->log('This event will be logged to both handlers.'); |
---|
22 | |
---|
23 | --EXPECT-- |
---|
24 | CONSOLE1 [info] This event will be logged to both handlers. |
---|
25 | CONSOLE2 [info] This event will be logged to both handlers. |
---|
26 | IDENT |
---|
27 | IDENT [info] This event will be logged to both handlers. |
---|
28 | IDENT [info] This event will be logged to both handlers. |
---|
Note: See
TracBrowser
for help on using the repository browser.