48 $this->_ident = $ident;
61 $this->_opened =
true;
62 foreach ($this->_children as $id => $child) {
63 $this->_opened &= $this->_children[$id]->open();
81 foreach ($this->_children as $id => $child) {
82 $closed &= $this->_children[$id]->close();
86 $this->_opened =
false;
105 foreach ($this->_children as $id => $child) {
106 $flushed &= $this->_children[$id]->flush();
130 function log($message, $priority = null)
133 if ($priority === null) {
143 if (!$this->_opened) {
149 foreach ($this->_children as $id => $child) {
150 $success &= $this->_children[$id]->log($message, $priority);
153 $this->
_announce(array(
'priority' => $priority,
'message' => $message));
182 parent::setIdent($ident);
185 foreach ($this->_children as $id => $child) {
186 $this->_children[$id]->setIdent($ident);
202 if (!is_a($child,
'Log')) {
206 $this->_children[$child->_id] = &$child;
222 if (!is_a($child,
'Log') || !isset($this->_children[$child->_id])) {
226 unset($this->_children[$child->_id]);
close()
Closes all of the child instances.
Log_composite($name, $ident='', $conf=array(), $level=PEAR_LOG_DEBUG)
Constructs a new composite Log object.
_announce($event)
Informs each registered observer instance that a new message has been logged.
flush()
Flushes all child instances.
setIdent($ident)
Sets this identification string for all of this composite's children.
open()
Opens all of the child instances.
log($message, $priority=null)
Sends $message and $priority to each child of this composite.
removeChild($child)
Removes a Log instance from the list of children.
addChild(&$child)
Adds a Log instance to the list of children.
isComposite()
Returns true if this is a composite.