Not all handlers require a formatter.
Change-Id: Ifb31aa278d4e90b7fa3a2b7bf3b20173b8345afd
if ( !isset( $this->singletons['handlers'][$name] ) ) {
$spec = $this->config['handlers'][$name];
$handler = ObjectFactory::getObjectFromSpec( $spec );
- $handler->setFormatter( $this->getFormatter( $spec['formatter'] ) );
+ if ( isset( $spec['formatter'] ) ) {
+ $handler->setFormatter(
+ $this->getFormatter( $spec['formatter'] )
+ );
+ }
$this->singletons['handlers'][$name] = $handler;
}
return $this->singletons['handlers'][$name];