Remove config.Server.Debug

no longer required with move to logger.Log and it's verbosity
capabilities
This commit is contained in:
Matthew R. Kasun
2022-05-09 09:49:17 -04:00
parent 5d3274e48d
commit 501108b53d
8 changed files with 2 additions and 24 deletions

View File

@@ -114,13 +114,6 @@ func UpdateKeys(nodeCfg *config.ClientConfig, client mqtt.Client) error {
// sets MQ client subscriptions for a specific node config
// should be called for each node belonging to a given server
func setSubscriptions(client mqtt.Client, nodeCfg *config.ClientConfig) {
if nodeCfg.DebugOn {
if token := client.Subscribe("#", 0, nil); token.Wait() && token.Error() != nil {
logger.Log(0, token.Error().Error())
return
}
logger.Log(0, "subscribed to all topics for debugging purposes")
}
if token := client.Subscribe(fmt.Sprintf("update/%s/%s", nodeCfg.Node.Network, nodeCfg.Node.ID), 0, mqtt.MessageHandler(NodeUpdate)); token.Wait() && token.Error() != nil {
logger.Log(0, token.Error().Error())
return