fix cli access to moto and broker dbug

This commit is contained in:
Stewart Allen 2023-06-17 12:47:04 -04:00
commit 7f7b125af4
6 changed files with 12 additions and 8 deletions

View file

@ -100,7 +100,11 @@ class Broker {
}
}
} else if (topic.indexOf(".topic.") < 0) {
dbug.debug(`undelivered '${topic}'`, message);
if (self.dbug) {
self.dbug.debug(`undelivered '${topic}'`, message);
} else {
console.log(`undelivered '${topic}'`, message);
}
}
return message;
}