|
@@ -46,10 +46,13 @@ class TaskLoggerService implements ConsumerInterface
|
|
|
$filename = $this->createTaskLoggerCmdFile($taskloggerId, $content);
|
|
|
$output = $this->runProcess($filename);
|
|
|
|
|
|
- $this->serviceContainer->get('monolog.logger.devicelog')->info($output['output'], [
|
|
|
- 'deviceType' => $msgBody['entityClass'],
|
|
|
- 'deviceId' => $msgBody['entityId'],
|
|
|
- ]);
|
|
|
+ $monologLoggerId = 'monolog.logger.devicelog';
|
|
|
+ if ($this->serviceContainer->has($monologLoggerId)) {
|
|
|
+ $this->serviceContainer->get($monologLoggerId)->info($output['output'], [
|
|
|
+ 'deviceType' => $msgBody['entityClass'],
|
|
|
+ 'deviceId' => $msgBody['entityId'],
|
|
|
+ ]);
|
|
|
+ }
|
|
|
|
|
|
var_export($output);
|
|
|
|