diff --git a/application/forms/Config/General/LoggingConfigForm.php b/application/forms/Config/General/LoggingConfigForm.php index e1b0e130f..75b82a330 100644 --- a/application/forms/Config/General/LoggingConfigForm.php +++ b/application/forms/Config/General/LoggingConfigForm.php @@ -39,7 +39,6 @@ class LoggingConfigForm extends Form 'label' => $this->translate('Logging Type'), 'description' => $this->translate('The type of logging to utilize.'), 'multiOptions' => array( - 'php' => $this->translate('Webserver Log', 'app.config.logging.type'), 'syslog' => 'Syslog', 'file' => $this->translate('File', 'app.config.logging.type'), 'none' => $this->translate('None', 'app.config.logging.type') @@ -65,7 +64,7 @@ class LoggingConfigForm extends Form ); } - if (false === isset($formData['logging_log']) || in_array($formData['logging_log'], array('syslog', 'php'))) { + if (false === isset($formData['logging_log']) || $formData['logging_log'] === 'syslog') { $this->addElement( 'text', 'logging_application', @@ -73,7 +72,7 @@ class LoggingConfigForm extends Form 'required' => true, 'label' => $this->translate('Application Prefix'), 'description' => $this->translate( - 'The name of the application by which to prefix log messages.' + 'The name of the application by which to prefix syslog messages.' ), 'requirement' => $this->translate('The application prefix must not contain whitespace.'), 'value' => 'icingaweb2', diff --git a/application/locale/de_DE/LC_MESSAGES/icinga.mo b/application/locale/de_DE/LC_MESSAGES/icinga.mo index c538f9dc0..d6f05c01e 100644 Binary files a/application/locale/de_DE/LC_MESSAGES/icinga.mo and b/application/locale/de_DE/LC_MESSAGES/icinga.mo differ diff --git a/application/locale/de_DE/LC_MESSAGES/icinga.po b/application/locale/de_DE/LC_MESSAGES/icinga.po index 37cf95ea2..f99ff565c 100644 --- a/application/locale/de_DE/LC_MESSAGES/icinga.po +++ b/application/locale/de_DE/LC_MESSAGES/icinga.po @@ -2979,11 +2979,6 @@ msgctxt "app.config.logging.level" msgid "Warning" msgstr "Warnung" -#: /vagrant/application/forms/Config/General/LoggingConfigForm.php:40 -msgctxt "app.config.logging.type" -msgid "Webserver Log" -msgstr "Webserver-Log" - #: /vagrant/application/views/scripts/authentication/login.phtml:5 msgid "" "Welcome to Icinga Web 2. For users of the screen reader Jaws full and " diff --git a/library/Icinga/Application/Logger/Writer/PhpWriter.php b/library/Icinga/Application/Logger/Writer/PhpWriter.php deleted file mode 100644 index 310cd7678..000000000 --- a/library/Icinga/Application/Logger/Writer/PhpWriter.php +++ /dev/null @@ -1,45 +0,0 @@ -ident = $config->get('application', 'icingaweb2'); - } - - /** - * {@inheritdoc} - */ - public function log($severity, $message) - { - if (! error_log($this->ident . ': ' . Logger::$levels[$severity] . ' - ' . ( - ini_get('error_log') === 'syslog' ? str_replace("\n", ' ', $message) : $message - ))) { - throw new NotWritableError('Could not log to ' . (ini_get('error_log') ?: 'SAPI')); - } - } -} diff --git a/modules/setup/library/Setup/Steps/GeneralConfigStep.php b/modules/setup/library/Setup/Steps/GeneralConfigStep.php index 95597f5c3..002bd965b 100644 --- a/modules/setup/library/Setup/Steps/GeneralConfigStep.php +++ b/modules/setup/library/Setup/Steps/GeneralConfigStep.php @@ -70,24 +70,12 @@ class GeneralConfigStep extends Step $loggingHtml = '

' . mt('setup', 'Logging will be disabled.') . '

'; } else { $level = $this->data['generalConfig']['logging_level']; - switch ($type) { - case 'syslog': - $typeText = t('Syslog', 'app.config.logging.type'); - break; - case 'php': - $typeText = t('Webserver Log', 'app.config.logging.type'); - break; - case 'file': - $typeText = t('File', 'app.config.logging.type'); - break; - } - $loggingHtml = '' . '' . '' . '' . '' - . '' + . '' . '' . '' . '' @@ -100,7 +88,7 @@ class GeneralConfigStep extends Step )) . '' . '' . '' - . ($type !== 'file' ? ( + . ($type === 'syslog' ? ( '' . '' ) : (
' . t('Type', 'app.config.logging') . '' . $typeText . '' . ($type === 'syslog' ? 'Syslog' : t('File', 'app.config.logging.type')) . '
' . t('Level', 'app.config.logging') . '
' . t('Application Prefix') . '' . $this->data['generalConfig']['logging_application'] . '