--- a/thermferm/mqtt.c Sun Apr 07 16:05:06 2024 +0200 +++ b/thermferm/mqtt.c Sun Apr 07 20:26:37 2024 +0200 @@ -171,7 +171,7 @@ *c = 0 ; if (debug) - fprintf(stdout, "piBoardId: Revision string: %s\n", line) ; + syslog(LOG_NOTICE, "piBoardId: Revision string: %s", line) ; // Need to work out if it's using the new or old encoding scheme: @@ -201,7 +201,7 @@ if ((revision & (1 << 23)) != 0) { // New way if (debug) - fprintf(stdout, "piBoardId: New Way: revision is: %08X\n", revision) ; + syslog(LOG_NOTICE, "piBoardId: New Way: revision is: %08X", revision) ; bRev = (revision & (0x0F << 0)) >> 0 ; bType = (revision & (0xFF << 4)) >> 4 ; @@ -217,10 +217,10 @@ *warranty = bWarranty ; if (debug) - fprintf(stdout, "piBoardId: rev: %d, type: %d, proc: %d, mfg: %d, mem: %d, warranty: %d\n", bRev, bType, bProc, bMfg, bMem, bWarranty) ; + syslog(LOG_NOTICE, "piBoardId: rev: %d, type: %d, proc: %d, mfg: %d, mem: %d, warranty: %d", bRev, bType, bProc, bMfg, bMem, bWarranty) ; } else { // Old way if (debug) - fprintf(stdout, "piBoardId: Old Way: revision is: %s\n", c) ; + syslog(LOG_NOTICE, "piBoardId: Old Way: revision is: %s", c) ; if (!isdigit (*c)) { syslog(LOG_NOTICE, "Bogus \"Revision\" line (no digit at start of revision)") ; @@ -374,7 +374,7 @@ void my_log_callback(struct mosquitto *my_mosq, void *obj, int level, const char *str) { // if (debug) -// fprintf(stdout, "MQTT: %s\n", str); +// syslog(LOG_NOTICE, "MQTT: %s", str); }