domotruc / jMQTT

Jeedom plugin to interface as a client with an MQTT broker.
16 stars 8 forks source link

log erroné sur création d'une commande info #42

Closed domotruc closed 6 years ago

domotruc commented 6 years ago

Lorsqu'une commande de type info est créé, 2 lignes sont logguées, la deuxième laissant penser qu'une commande de type action est créé. Par exemple:

[2018-05-07 07:37:37][INFO] : Creating command of type info Taillanderie|HauteurEau/TaillanderieBas
[2018-05-07 07:37:37][INFO] : Creating action command Taillanderie|HauteurEau/TaillanderieBas
domotruc commented 6 years ago

Dans la fonction preSave, le code suivant est executé, ce qui explique le problème:

if ($this->getId() == '') {
   log::add('jMQTT', 'info', 'Creating action command ' . $cmdName);
   $prevRetain = $retain;
   $this->setConfiguration('prev_retain', $retain);
}

=> Ce bug n'a aucun impact fonctionnel, c'est bien uniquement un pb de log.