 
 #define MQTTprefix HOSTNAME  // Change this if you want the MQTT topic to be
                              // independent of the hostname.
-#define MQTTack MQTTprefix "/sent"  // Topic we send back acknowledgements on
-#define MQTTcommand MQTTprefix "/send"  // Topic we get new commands from.
+#define MQTTack MQTTprefix "/sent"  // Topic we send back acknowledgements on.
+#define MQTTcommand MQTTprefix "/send"   // Topic we get new commands from.
 #define MQTTrecv MQTTprefix "/received"  // Topic we send received IRs to.
+#define MQTTlog MQTTprefix "/log"        // Topic we send log messages to.
+#define MQTTstatus MQTTprefix "/status"  // Topic for the Last Will & Testament.
 #endif  // MQTT_ENABLE
 
 const char* kHtmlUsername = "admin";    // <=- CHANGE_ME (optional)

// NOTE: Make sure you set your Serial Monitor to the same speed.
#define BAUD_RATE 115200  // Serial port Baud rate.

// ADVANCED USAGE ONLY

// Change if you need multiple independent send gpio/topics.
const uint8_t gpioTable[] = {

        lastReconnectAttempt = 0;
        wasConnected = true;
        if (boot) {
          mqtt_client.publish(MQTTlog, "IR Server just booted");
          boot = false;
        } else {
          String text = "IR Server just (re)connected to MQTT. "
              "Lost connection about " + timeSince(lastConnectedTime);
          mqtt_client.publish(MQTTlog, text.c_str());
        }
        lastConnectedTime = now;
        debug("successful client mqtt connection");
