public function getLogger($loggerName)
{
try {
// first let's see if we've an application logger registered
if ($logger = $this->getApplication()->getLogger($loggerName)) {
return $logger;
}
// then try to load the global logger instance if available
return $this->getApplication()->getNamingDirectory()->search(sprintf('php:global/log/%s', $loggerName));
} catch (NamingException $ne) {
// do nothing, we simply have no logger with the requested name
}
}