Move Logger to the Application namespace

fixes #7148
This commit is contained in:
Eric Lippmann 2014-10-31 10:27:17 +01:00
parent 0bf6dc24a8
commit 16352fc10c
33 changed files with 45 additions and 47 deletions

View File

@ -9,7 +9,7 @@ use Icinga\Web\Controller\ActionController;
use Icinga\Form\Authentication\LoginForm;
use Icinga\Authentication\AuthChain;
use Icinga\Application\Config;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Exception\AuthenticationException;
use Icinga\Exception\NotReadableError;
use Icinga\Exception\ConfigurationError;

View File

@ -3,7 +3,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
use Icinga\Web\Url;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Config\PreservingIniWriter;
use Icinga\Application\Config as IcingaConfig;
use Icinga\Web\Widget\Dashboard;

View File

@ -4,7 +4,7 @@
// namespace Icinga\Application\Controllers;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Web\Controller\ActionController;
use Icinga\Application\Icinga;

View File

@ -4,7 +4,7 @@
use Icinga\Web\Controller\ActionController;
use Icinga\Filter\Filter;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
/**
* Application wide interface for filtering

View File

@ -5,9 +5,7 @@
use Icinga\Module\Monitoring\Controller;
use Icinga\Web\Hook;
use Icinga\Web\Url;
use Icinga\Data\ResourceFactory;
use Icinga\Logger\Logger;
use Icinga\Logger\Writer\FileWriter;
use Icinga\Application\Logger;
use Icinga\Protocol\File\FileReader;
use \Zend_Controller_Action_Exception as ActionError;

View File

@ -4,7 +4,7 @@
use Icinga\Web\Controller\ActionController;
use Icinga\Application\Icinga;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Web\FileCache;
use Zend_Controller_Action_Exception as ActionException;

View File

@ -5,7 +5,7 @@
namespace Icinga\Form\Config\General;
use Icinga\Application\Icinga;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Web\Form;
use Icinga\Web\Form\Validator\WritablePathValidator;

View File

@ -6,7 +6,7 @@ namespace Icinga\Form;
use Exception;
use DateTimeZone;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\User\Preferences;
use Icinga\User\Preferences\PreferencesStore;
use Icinga\Util\TimezoneDetect;

View File

@ -11,7 +11,7 @@ use Icinga\Application\Modules\Manager as ModuleManager;
use Icinga\Data\ResourceFactory;
use Icinga\Exception\ConfigurationError;
use Icinga\Exception\NotReadableError;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Util\DateTimeFactory;
use Icinga\Util\Translator;
use Icinga\Exception\IcingaException;

View File

@ -9,7 +9,7 @@ use Icinga\Application\ApplicationBootstrap;
use Icinga\Cli\Params;
use Icinga\Cli\Loader;
use Icinga\Cli\Screen;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Application\Benchmark;
use Icinga\Exception\ProgrammingError;
use Zend_Config;

View File

@ -2,13 +2,13 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Logger;
namespace Icinga\Application;
use Exception;
use Zend_Config;
use Icinga\Application\Logger\Writer\FileWriter;
use Icinga\Application\Logger\Writer\SyslogWriter;
use Icinga\Exception\ConfigurationError;
use Icinga\Logger\Writer\FileWriter;
use Icinga\Logger\Writer\SyslogWriter;
/**
* Logger
@ -57,7 +57,7 @@ class Logger
/**
* Log writer
*
* @var \Icinga\Logger\LogWriter
* @var \Icinga\Application\Logger\LogWriter
*/
protected $writer;
@ -133,12 +133,12 @@ class Logger
*
* @param Zend_Config $config The configuration to initialize the writer with
*
* @return \Icinga\Logger\LogWriter The requested log writer
* @throws ConfigurationError If the requested writer cannot be found
* @return \Icinga\Application\Logger\LogWriter The requested log writer
* @throws ConfigurationError If the requested writer cannot be found
*/
protected function createWriter(Zend_Config $config)
{
$class = 'Icinga\\Logger\\Writer\\' . ucfirst(strtolower($config->log)) . 'Writer';
$class = 'Icinga\\Application\\Logger\\Writer\\' . ucfirst(strtolower($config->log)) . 'Writer';
if (! class_exists($class)) {
throw new ConfigurationError(
'Cannot find log writer of type "%s"',
@ -258,7 +258,7 @@ class Logger
/**
* Get the log writer to use
*
* @return \Icinga\Logger\LogWriter
* @return \Icinga\Application\Logger\LogWriter
*/
public function getWriter()
{

View File

@ -2,7 +2,7 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Logger;
namespace Icinga\Application\Logger;
use Zend_Config;

View File

@ -2,13 +2,13 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Logger\Writer;
namespace Icinga\Application\Logger\Writer;
use Exception;
use Zend_Config;
use Icinga\Application\Logger;
use Icinga\Application\Logger\LogWriter;
use Icinga\Exception\ConfigurationError;
use Icinga\Logger\Logger;
use Icinga\Logger\LogWriter;
use Icinga\Util\File;
/**

View File

@ -2,11 +2,11 @@
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Icinga\Logger\Writer;
namespace Icinga\Application\Logger\Writer;
use Zend_Config;
use Icinga\Logger\Logger;
use Icinga\Logger\LogWriter;
use Icinga\Application\Logger;
use Icinga\Application\Logger\LogWriter;
/**
* Log to the syslog service

View File

@ -6,7 +6,7 @@ namespace Icinga\Application\Modules;
use Icinga\Application\ApplicationBootstrap;
use Icinga\Application\Icinga;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Data\DataArray\ArrayDatasource;
use Icinga\Data\SimpleQuery;
use Icinga\Exception\ConfigurationError;

View File

@ -12,7 +12,7 @@ use Zend_Controller_Router_Route_Regex as RegexRoute;
use Icinga\Application\ApplicationBootstrap;
use Icinga\Application\Config;
use Icinga\Application\Icinga;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Util\Translator;
use Icinga\Web\Hook;
use Icinga\Web\Menu;

View File

@ -9,7 +9,7 @@ require_once __DIR__ . '/ApplicationBootstrap.php';
use Icinga\Authentication\Manager as AuthenticationManager;
use Icinga\Exception\ConfigurationError;
use Icinga\Exception\NotReadableError;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Util\TimezoneDetect;
use Icinga\Web\Request;
use Icinga\Web\Response;

View File

@ -6,7 +6,7 @@ namespace Icinga\Authentication;
use Iterator;
use Zend_Config;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Exception\ConfigurationError;
/**

View File

@ -4,7 +4,7 @@
namespace Icinga\Authentication\Backend;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\User;
use Icinga\Authentication\UserBackend;
use Icinga\Protocol\Ldap\Connection;

View File

@ -9,7 +9,7 @@ use Zend_Config;
use Icinga\Application\Config;
use Icinga\Exception\IcingaException;
use Icinga\Exception\NotReadableError;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\User;
use Icinga\User\Preferences;
use Icinga\User\Preferences\PreferencesStore;

View File

@ -7,7 +7,7 @@ namespace Icinga\Protocol\Ldap;
use Icinga\Protocol\Ldap\Exception as LdapException;
use Icinga\Application\Platform;
use Icinga\Application\Config;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Zend_Config;
/**

View File

@ -5,7 +5,7 @@
namespace Icinga\Web;
use Exception;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Exception\ProgrammingError;
/**

View File

@ -9,7 +9,7 @@ use RecursiveIterator;
use Zend_Config;
use Icinga\Application\Config;
use Icinga\Application\Icinga;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Exception\ConfigurationError;
use Icinga\Exception\ProgrammingError;
use Icinga\Web\Url;

View File

@ -6,7 +6,7 @@ namespace Icinga\Web;
use Exception;
use RecursiveIteratorIterator;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
/**
* A renderer to draw a menu with its sub-menus using an unordered html list

View File

@ -6,7 +6,7 @@ namespace Icinga\Web;
use Icinga\Exception\ProgrammingError;
use Icinga\Application\Platform;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Web\Session;
/**

View File

@ -4,7 +4,7 @@
namespace Icinga\Web\Session;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Exception\ConfigurationError;
/**

View File

@ -7,7 +7,7 @@ namespace Icinga\Web\Widget\Chart;
use Icinga\Web\Widget\AbstractWidget;
use Icinga\Web\Url;
use Icinga\Util\Format;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
/**
* A SVG-PieChart intended to be displayed as a small icon next to labels, to offer a better visualization of the

View File

@ -4,7 +4,7 @@
use Icinga\Application\Icinga;
use Icinga\Application\Config;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Module\Monitoring\Form\Command\DisableNotificationWithExpireForm;
use Icinga\Module\Monitoring\Form\Command\SingleArgumentCommandForm;
use Icinga\Web\Form;

View File

@ -4,7 +4,7 @@
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Zend_Db_Select;
class GroupSummaryQuery extends IdoQuery

View File

@ -5,7 +5,7 @@
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
use Icinga\Exception\IcingaException;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Data\Db\DbQuery;
use Icinga\Exception\ProgrammingError;
use Icinga\Application\Icinga;

View File

@ -6,7 +6,7 @@ namespace Icinga\Module\Monitoring\Command\Transport;
use Exception;
use LogicException;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Module\Monitoring\Command\Exception\TransportException;
use Icinga\Module\Monitoring\Command\IcingaCommand;
use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;

View File

@ -5,7 +5,7 @@
namespace Icinga\Module\Monitoring\Command\Transport;
use LogicException;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Module\Monitoring\Command\Exception\TransportException;
use Icinga\Module\Monitoring\Command\IcingaCommand;
use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;

View File

@ -5,9 +5,9 @@
namespace Tests\Icinga\Logger\Writer;
use Zend_Config;
use Icinga\Logger\Logger;
use Icinga\Application\Logger;
use Icinga\Application\Logger\Writer\FileWriter;
use Icinga\Test\BaseTestCase;
use Icinga\Logger\Writer\FileWriter;
class StreamWriterTest extends BaseTestCase
{