monitoring: Don't translate exception messages in the local command file

This commit is contained in:
Eric Lippmann 2014-10-29 10:00:29 +01:00
parent 6973492b0d
commit 1cc1521607

View File

@ -17,6 +17,11 @@ use Icinga\Util\File;
*/ */
class LocalCommandFile implements CommandTransportInterface class LocalCommandFile implements CommandTransportInterface
{ {
/**
* Transport identifier
*/
const TRANSPORT = 'local';
/** /**
* Path to the icinga command file * Path to the icinga command file
* *
@ -108,11 +113,9 @@ class LocalCommandFile implements CommandTransportInterface
} }
$commandString = $this->renderer->render($command, $now); $commandString = $this->renderer->render($command, $now);
Logger::debug( Logger::debug(
sprintf( 'Sending external Icinga command "%s" to the local command file "%s"',
mt('monitoring', 'Sending external Icinga command "%s" to the local command file "%s"'), $commandString,
$commandString, $this->path
$this->path
)
); );
try { try {
$file = new File($this->path, $this->openMode); $file = new File($this->path, $this->openMode);
@ -120,10 +123,7 @@ class LocalCommandFile implements CommandTransportInterface
$file->fflush(); $file->fflush();
} catch (Exception $e) { } catch (Exception $e) {
throw new TransportException( throw new TransportException(
mt( 'Can\'t send external Icinga command "%s" to the local command file "%s": %s',
'monitoring',
'Can\'t send external Icinga command "%s" to the local command file "%s": %s'
),
$commandString, $commandString,
$this->path, $this->path,
$e $e