Skip to content

Commit

Permalink
monitoring: Don't translate exception messages in the local command file
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Oct 29, 2014
1 parent 6973492 commit 1cc1521
Showing 1 changed file with 9 additions and 9 deletions.
Expand Up @@ -17,6 +17,11 @@
*/
class LocalCommandFile implements CommandTransportInterface
{
/**
* Transport identifier
*/
const TRANSPORT = 'local';

/**
* Path to the icinga command file
*
Expand Down Expand Up @@ -108,22 +113,17 @@ public function send(IcingaCommand $command, $now = null)
}
$commandString = $this->renderer->render($command, $now);
Logger::debug(
sprintf(
mt('monitoring', 'Sending external Icinga command "%s" to the local command file "%s"'),
$commandString,
$this->path
)
'Sending external Icinga command "%s" to the local command file "%s"',
$commandString,
$this->path
);
try {
$file = new File($this->path, $this->openMode);
$file->fwrite($commandString . "\n");
$file->fflush();
} catch (Exception $e) {
throw new TransportException(
mt(
'monitoring',
'Can\'t send external Icinga command "%s" to the local command file "%s": %s'
),
'Can\'t send external Icinga command "%s" to the local command file "%s": %s',
$commandString,
$this->path,
$e
Expand Down

0 comments on commit 1cc1521

Please sign in to comment.