mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
monitoring: Don't translate exception messages in the local command file
This commit is contained in:
parent
6973492b0d
commit
1cc1521607
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user