diff --git a/src/CatM1ConnectionHandler.cpp b/src/CatM1ConnectionHandler.cpp
index c8bd7fc..02ef51f 100644
--- a/src/CatM1ConnectionHandler.cpp
+++ b/src/CatM1ConnectionHandler.cpp
@@ -81,7 +81,7 @@ NetworkConnectionState CatM1ConnectionHandler::update_handleInit()
     _settings.catm1.band,
     _reset))
   {
-    Debug.print(DBG_ERROR, F("The board was not able to register to the network..."));
+    DEBUG_ERROR(F("The board was not able to register to the network..."));
     _reset = true;
     return NetworkConnectionState::DISCONNECTED;
   }
@@ -93,7 +93,7 @@ NetworkConnectionState CatM1ConnectionHandler::update_handleConnecting()
 {
   if (!GSM.isConnected())
   {
-    Debug.print(DBG_ERROR, F("GSM connection not alive... disconnecting"));
+    DEBUG_ERROR(F("GSM connection not alive... disconnecting"));
     return NetworkConnectionState::DISCONNECTED;
   }
 
@@ -101,18 +101,18 @@ NetworkConnectionState CatM1ConnectionHandler::update_handleConnecting()
     return NetworkConnectionState::CONNECTED;
   }
 
-  Debug.print(DBG_INFO, F("Sending PING to outer space..."));
+  DEBUG_INFO(F("Sending PING to outer space..."));
   int const ping_result = GSM.ping("time.arduino.cc");
-  Debug.print(DBG_INFO, F("GSM.ping(): %d"), ping_result);
+  DEBUG_INFO(F("GSM.ping(): %d"), ping_result);
   if (ping_result < 0)
   {
-    Debug.print(DBG_ERROR, F("Internet check failed"));
-    Debug.print(DBG_INFO, F("Retrying in  \"%d\" milliseconds"), 2 * CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+    DEBUG_ERROR(F("Internet check failed"));
+    DEBUG_INFO(F("Retrying in  \"%d\" milliseconds"), 2 * CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
     return NetworkConnectionState::CONNECTING;
   }
   else
   {
-    Debug.print(DBG_INFO, F("Connected to Internet"));
+    DEBUG_INFO(F("Connected to Internet"));
     return NetworkConnectionState::CONNECTED;
   }
 }
@@ -122,7 +122,7 @@ NetworkConnectionState CatM1ConnectionHandler::update_handleConnected()
   int const is_gsm_access_alive = GSM.isConnected();
   if (is_gsm_access_alive != 1)
   {
-    Debug.print(DBG_ERROR, F("GSM connection not alive... disconnecting"));
+    DEBUG_ERROR(F("GSM connection not alive... disconnecting"));
     return NetworkConnectionState::DISCONNECTED;
   }
   return NetworkConnectionState::CONNECTED;
diff --git a/src/CellularConnectionHandler.cpp b/src/CellularConnectionHandler.cpp
index c6a9077..101f47c 100644
--- a/src/CellularConnectionHandler.cpp
+++ b/src/CellularConnectionHandler.cpp
@@ -46,7 +46,7 @@ unsigned long CellularConnectionHandler::getTime()
 
 UDP & CellularConnectionHandler::getUDP()
 {
-  Debug.print(DBG_ERROR, F("CellularConnectionHandler has no UDP support"));
+  DEBUG_ERROR(F("CellularConnectionHandler has no UDP support"));
   while(1) {};
 }
 
@@ -59,15 +59,15 @@ NetworkConnectionState CellularConnectionHandler::update_handleInit()
   _cellular.begin();
   _cellular.setDebugStream(Serial);
   if (strlen(_settings.cell.pin) > 0 && !_cellular.unlockSIM(_settings.cell.pin)) {
-    Debug.print(DBG_ERROR, F("SIM not present or wrong PIN"));
+    DEBUG_ERROR(F("SIM not present or wrong PIN"));
     return NetworkConnectionState::ERROR;
   }
 
   if (!_cellular.connect(String(_settings.cell.apn), String(_settings.cell.login), String(_settings.cell.pass))) {
-    Debug.print(DBG_ERROR, F("The board was not able to register to the network..."));
+    DEBUG_ERROR(F("The board was not able to register to the network..."));
     return NetworkConnectionState::ERROR;
   }
-  Debug.print(DBG_INFO, F("Connected to Network"));
+  DEBUG_INFO(F("Connected to Network"));
   return NetworkConnectionState::CONNECTING;
 }
 
@@ -82,8 +82,8 @@ NetworkConnectionState CellularConnectionHandler::update_handleConnecting()
   }
 
   if(getTime() == 0){
-    Debug.print(DBG_ERROR, F("Internet check failed"));
-    Debug.print(DBG_INFO, F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+    DEBUG_ERROR(F("Internet check failed"));
+    DEBUG_INFO(F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
     return NetworkConnectionState::CONNECTING;
   }
 
diff --git a/src/EthernetConnectionHandler.cpp b/src/EthernetConnectionHandler.cpp
index 6e73038..61f0394 100644
--- a/src/EthernetConnectionHandler.cpp
+++ b/src/EthernetConnectionHandler.cpp
@@ -69,7 +69,7 @@ EthernetConnectionHandler::EthernetConnectionHandler(
 NetworkConnectionState EthernetConnectionHandler::update_handleInit()
 {
   if (Ethernet.hardwareStatus() == EthernetNoHardware) {
-    Debug.print(DBG_ERROR, F("Error, ethernet shield was not found."));
+    DEBUG_ERROR(F("Error, ethernet shield was not found."));
     return NetworkConnectionState::ERROR;
   }
   IPAddress ip(_settings.eth.ip.type, _settings.eth.ip.bytes);
@@ -83,16 +83,16 @@ NetworkConnectionState EthernetConnectionHandler::update_handleInit()
         _settings.eth.timeout,
         _settings.eth.response_timeout) == 0) {
 
-      Debug.print(DBG_ERROR, F("Failed to configure Ethernet, check cable connection"));
-      Debug.print(DBG_VERBOSE, "timeout: %d, response timeout: %d",
+      DEBUG_ERROR(F("Failed to configure Ethernet, check cable connection"));
+      DEBUG_VERBOSE("timeout: %d, response timeout: %d",
         _settings.eth.timeout, _settings.eth.response_timeout);
       return NetworkConnectionState::INIT;
     }
   // An ip address is not provided -> dhcp configuration
   } else {
     if (Ethernet.begin(nullptr, _settings.eth.timeout, _settings.eth.response_timeout) == 0) {
-      Debug.print(DBG_ERROR, F("Waiting Ethernet configuration from DHCP server, check cable connection"));
-      Debug.print(DBG_VERBOSE, "timeout: %d, response timeout: %d",
+      DEBUG_ERROR(F("Waiting Ethernet configuration from DHCP server, check cable connection"));
+      DEBUG_VERBOSE("timeout: %d, response timeout: %d",
         _settings.eth.timeout, _settings.eth.response_timeout);
 
       return NetworkConnectionState::INIT;
@@ -113,16 +113,16 @@ NetworkConnectionState EthernetConnectionHandler::update_handleConnecting()
   }
 
   int ping_result = Ethernet.ping("time.arduino.cc");
-  Debug.print(DBG_INFO, F("Ethernet.ping(): %d"), ping_result);
+  DEBUG_INFO(F("Ethernet.ping(): %d"), ping_result);
   if (ping_result < 0)
   {
-    Debug.print(DBG_ERROR, F("Internet check failed"));
-    Debug.print(DBG_INFO, F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+    DEBUG_ERROR(F("Internet check failed"));
+    DEBUG_INFO(F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
     return NetworkConnectionState::CONNECTING;
   }
   else
   {
-    Debug.print(DBG_INFO, F("Connected to Internet"));
+    DEBUG_INFO(F("Connected to Internet"));
     return NetworkConnectionState::CONNECTED;
   }
 
@@ -131,10 +131,10 @@ NetworkConnectionState EthernetConnectionHandler::update_handleConnecting()
 NetworkConnectionState EthernetConnectionHandler::update_handleConnected()
 {
   if (Ethernet.linkStatus() == LinkOFF) {
-    Debug.print(DBG_ERROR, F("Ethernet link OFF, connection lost."));
+    DEBUG_ERROR(F("Ethernet link OFF, connection lost."));
     if (_keep_alive)
     {
-      Debug.print(DBG_ERROR, F("Attempting reconnection"));
+      DEBUG_ERROR(F("Attempting reconnection"));
     }
     return NetworkConnectionState::DISCONNECTED;
   }
diff --git a/src/GSMConnectionHandler.cpp b/src/GSMConnectionHandler.cpp
index 64b04d0..d468a19 100644
--- a/src/GSMConnectionHandler.cpp
+++ b/src/GSMConnectionHandler.cpp
@@ -80,13 +80,13 @@ NetworkConnectionState GSMConnectionHandler::update_handleInit()
 
   if (_gsm.begin(_settings.gsm.pin) != GSM_READY)
   {
-    Debug.print(DBG_ERROR, F("SIM not present or wrong PIN"));
+    DEBUG_ERROR(F("SIM not present or wrong PIN"));
     return NetworkConnectionState::ERROR;
   }
 
   mkr_gsm_feed_watchdog();
 
-  Debug.print(DBG_INFO, F("SIM card ok"));
+  DEBUG_INFO(F("SIM card ok"));
   _gsm.setTimeout(GSM_TIMEOUT);
   _gprs.setTimeout(GPRS_TIMEOUT);
 
@@ -94,11 +94,11 @@ NetworkConnectionState GSMConnectionHandler::update_handleInit()
 
   GSM3_NetworkStatus_t const network_status = _gprs.attachGPRS(
     _settings.gsm.apn, _settings.gsm.login, _settings.gsm.pass, true);
-  Debug.print(DBG_DEBUG, F("GPRS.attachGPRS(): %d"), network_status);
+  DEBUG_DEBUG(F("GPRS.attachGPRS(): %d"), network_status);
   if (network_status == GSM3_NetworkStatus_t::ERROR)
   {
-    Debug.print(DBG_ERROR, F("GPRS attach failed"));
-    Debug.print(DBG_ERROR, F("Make sure the antenna is connected and reset your board."));
+    DEBUG_ERROR(F("GPRS attach failed"));
+    DEBUG_ERROR(F("Make sure the antenna is connected and reset your board."));
     return NetworkConnectionState::ERROR;
   }
 
@@ -111,18 +111,18 @@ NetworkConnectionState GSMConnectionHandler::update_handleConnecting()
     return NetworkConnectionState::CONNECTED;
   }
 
-  Debug.print(DBG_INFO, F("Sending PING to outer space..."));
+  DEBUG_INFO(F("Sending PING to outer space..."));
   int const ping_result = _gprs.ping("time.arduino.cc");
-  Debug.print(DBG_INFO, F("GPRS.ping(): %d"), ping_result);
+  DEBUG_INFO(F("GPRS.ping(): %d"), ping_result);
   if (ping_result < 0)
   {
-    Debug.print(DBG_ERROR, F("PING failed"));
-    Debug.print(DBG_INFO, F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+    DEBUG_ERROR(F("PING failed"));
+    DEBUG_INFO(F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
     return NetworkConnectionState::CONNECTING;
   }
   else
   {
-    Debug.print(DBG_INFO, F("Connected to GPRS Network"));
+    DEBUG_INFO(F("Connected to GPRS Network"));
     return NetworkConnectionState::CONNECTED;
   }
 }
diff --git a/src/GenericConnectionHandler.cpp b/src/GenericConnectionHandler.cpp
index ce6c198..9a2ce8d 100644
--- a/src/GenericConnectionHandler.cpp
+++ b/src/GenericConnectionHandler.cpp
@@ -146,7 +146,7 @@ static inline ConnectionHandler* instantiate_handler(NetworkAdapter adapter) {
         #endif
 
         default:
-            Debug.print(DBG_ERROR, "Network adapter not supported by this platform: %d", adapter);
+            DEBUG_ERROR("Network adapter not supported by this platform: %d", adapter);
             return nullptr;
     }
 }
diff --git a/src/LoRaConnectionHandler.cpp b/src/LoRaConnectionHandler.cpp
index bc753fd..afc771f 100644
--- a/src/LoRaConnectionHandler.cpp
+++ b/src/LoRaConnectionHandler.cpp
@@ -69,20 +69,38 @@ int LoRaConnectionHandler::write(const uint8_t * buf, size_t size)
   {
     switch (err)
     {
-      case LoRaCommunicationError::LORA_ERROR_ACK_NOT_RECEIVED:     Debug.print(DBG_ERROR, F("Message ack was not received, the message could not be delivered")); break;
-      case LoRaCommunicationError::LORA_ERROR_GENERIC:              Debug.print(DBG_ERROR, F("LoRa generic error (LORA_ERROR)"));                                  break;
-      case LoRaCommunicationError::LORA_ERROR_WRONG_PARAM:          Debug.print(DBG_ERROR, F("LoRa malformed param error (LORA_ERROR_PARAM"));                     break;
-      case LoRaCommunicationError::LORA_ERROR_COMMUNICATION_BUSY:   Debug.print(DBG_ERROR, F("LoRa chip is busy (LORA_ERROR_BUSY)"));                              break;
-      case LoRaCommunicationError::LORA_ERROR_MESSAGE_OVERFLOW:     Debug.print(DBG_ERROR, F("LoRa chip overflow error (LORA_ERROR_OVERFLOW)"));                   break;
-      case LoRaCommunicationError::LORA_ERROR_NO_NETWORK_AVAILABLE: Debug.print(DBG_ERROR, F("LoRa no network error (LORA_ERROR_NO_NETWORK)"));                    break;
-      case LoRaCommunicationError::LORA_ERROR_RX_PACKET:            Debug.print(DBG_ERROR, F("LoRa rx error (LORA_ERROR_RX)"));                                    break;
-      case LoRaCommunicationError::LORA_ERROR_REASON_UNKNOWN:       Debug.print(DBG_ERROR, F("LoRa unknown error (LORA_ERROR_UNKNOWN)"));                          break;
-      case LoRaCommunicationError::LORA_ERROR_MAX_PACKET_SIZE:      Debug.print(DBG_ERROR, F("Message length is bigger than max LoRa packet!"));                   break;
+      case LoRaCommunicationError::LORA_ERROR_ACK_NOT_RECEIVED:
+        DEBUG_ERROR(F("Message ack was not received, the message could not be delivered"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_GENERIC:
+        DEBUG_ERROR(F("LoRa generic error (LORA_ERROR)"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_WRONG_PARAM:
+        DEBUG_ERROR(F("LoRa malformed param error (LORA_ERROR_PARAM"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_COMMUNICATION_BUSY:
+        DEBUG_ERROR(F("LoRa chip is busy (LORA_ERROR_BUSY)"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_MESSAGE_OVERFLOW:
+        DEBUG_ERROR(F("LoRa chip overflow error (LORA_ERROR_OVERFLOW)"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_NO_NETWORK_AVAILABLE:
+        DEBUG_ERROR(F("LoRa no network error (LORA_ERROR_NO_NETWORK)"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_RX_PACKET:
+        DEBUG_ERROR(F("LoRa rx error (LORA_ERROR_RX)"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_REASON_UNKNOWN:
+        DEBUG_ERROR(F("LoRa unknown error (LORA_ERROR_UNKNOWN)"));
+        break;
+      case LoRaCommunicationError::LORA_ERROR_MAX_PACKET_SIZE:
+        DEBUG_ERROR(F("Message length is bigger than max LoRa packet!"));
+        break;
     }
   }
   else
   {
-    Debug.print(DBG_INFO, F("Message sent correctly!"));
+    DEBUG_INFO(F("Message sent correctly!"));
   }
   return err;
 }
@@ -105,7 +123,7 @@ NetworkConnectionState LoRaConnectionHandler::update_handleInit()
 {
   if (!_modem.begin((_lora_band)_settings.lora.band))
   {
-    Debug.print(DBG_ERROR, F("Something went wrong; are you indoor? Move near a window, then reset and retry."));
+    DEBUG_ERROR(F("Something went wrong; are you indoor? Move near a window, then reset and retry."));
     return NetworkConnectionState::ERROR;
   }
   // Set channelmask based on configuration
@@ -116,7 +134,7 @@ NetworkConnectionState LoRaConnectionHandler::update_handleInit()
   delay(100);
   _modem.configureClass((_lora_class)_settings.lora.deviceClass);
   delay(100);
-  Debug.print(DBG_INFO, F("Connecting to the network"));
+  DEBUG_INFO(F("Connecting to the network"));
   return NetworkConnectionState::CONNECTING;
 }
 
@@ -125,13 +143,13 @@ NetworkConnectionState LoRaConnectionHandler::update_handleConnecting()
   bool const network_status = _modem.joinOTAA(_settings.lora.appeui, _settings.lora.appkey);
   if (network_status != true)
   {
-    Debug.print(DBG_ERROR, F("Connection to the network failed"));
-    Debug.print(DBG_INFO, F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+    DEBUG_ERROR(F("Connection to the network failed"));
+    DEBUG_INFO(F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
     return NetworkConnectionState::INIT;
   }
   else
   {
-    Debug.print(DBG_INFO, F("Connected to the network"));
+    DEBUG_INFO(F("Connected to the network"));
     return NetworkConnectionState::CONNECTED;
   }
 }
@@ -141,10 +159,10 @@ NetworkConnectionState LoRaConnectionHandler::update_handleConnected()
   bool const network_status = _modem.connected();
   if (network_status != true)
   {
-    Debug.print(DBG_ERROR, F("Connection to the network lost."));
+    DEBUG_ERROR(F("Connection to the network lost."));
     if (_keep_alive)
     {
-      Debug.print(DBG_ERROR, F("Attempting reconnection"));
+      DEBUG_ERROR(F("Attempting reconnection"));
     }
     return NetworkConnectionState::DISCONNECTED;
   }
@@ -153,10 +171,10 @@ NetworkConnectionState LoRaConnectionHandler::update_handleConnected()
 
 NetworkConnectionState LoRaConnectionHandler::update_handleDisconnecting()
 {
-  Debug.print(DBG_ERROR, F("Connection to the network lost."));
+  DEBUG_ERROR(F("Connection to the network lost."));
   if (_keep_alive)
   {
-    Debug.print(DBG_ERROR, F("Attempting reconnection"));
+    DEBUG_ERROR(F("Attempting reconnection"));
   }
   return NetworkConnectionState::DISCONNECTED;
 }
diff --git a/src/NBConnectionHandler.cpp b/src/NBConnectionHandler.cpp
index 02d62ba..74db3d8 100644
--- a/src/NBConnectionHandler.cpp
+++ b/src/NBConnectionHandler.cpp
@@ -93,13 +93,13 @@ NetworkConnectionState NBConnectionHandler::update_handleInit()
                 _settings.nb.login,
                 _settings.nb.pass) == NB_READY)
   {
-    Debug.print(DBG_INFO, F("SIM card ok"));
+    DEBUG_INFO(F("SIM card ok"));
     _nb.setTimeout(NB_TIMEOUT);
     return NetworkConnectionState::CONNECTING;
   }
   else
   {
-    Debug.print(DBG_ERROR, F("SIM not present or wrong PIN"));
+    DEBUG_ERROR(F("SIM not present or wrong PIN"));
     return NetworkConnectionState::ERROR;
   }
 }
@@ -107,15 +107,15 @@ NetworkConnectionState NBConnectionHandler::update_handleInit()
 NetworkConnectionState NBConnectionHandler::update_handleConnecting()
 {
   NB_NetworkStatus_t const network_status = _nb_gprs.attachGPRS(true);
-  Debug.print(DBG_DEBUG, F("GPRS.attachGPRS(): %d"), network_status);
+  DEBUG_DEBUG(F("GPRS.attachGPRS(): %d"), network_status);
   if (network_status == NB_NetworkStatus_t::NB_ERROR)
   {
-    Debug.print(DBG_ERROR, F("GPRS.attachGPRS() failed"));
+    DEBUG_ERROR(F("GPRS.attachGPRS() failed"));
     return NetworkConnectionState::ERROR;
   }
   else
   {
-    Debug.print(DBG_INFO, F("Connected to GPRS Network"));
+    DEBUG_INFO(F("Connected to GPRS Network"));
     return NetworkConnectionState::CONNECTED;
   }
 }
@@ -123,22 +123,22 @@ NetworkConnectionState NBConnectionHandler::update_handleConnecting()
 NetworkConnectionState NBConnectionHandler::update_handleConnected()
 {
   int const nb_is_access_alive = _nb.isAccessAlive();
-  Debug.print(DBG_VERBOSE, F("GPRS.isAccessAlive(): %d"), nb_is_access_alive);
+  DEBUG_VERBOSE(F("GPRS.isAccessAlive(): %d"), nb_is_access_alive);
   if (nb_is_access_alive != 1)
   {
-    Debug.print(DBG_INFO, F("Disconnected from cellular network"));
+    DEBUG_INFO(F("Disconnected from cellular network"));
     return NetworkConnectionState::DISCONNECTED;
   }
   else
   {
-    Debug.print(DBG_VERBOSE, F("Connected to Cellular Network"));
+    DEBUG_VERBOSE(F("Connected to Cellular Network"));
     return NetworkConnectionState::CONNECTED;
   }
 }
 
 NetworkConnectionState NBConnectionHandler::update_handleDisconnecting()
 {
-  Debug.print(DBG_VERBOSE, F("Disconnecting from Cellular Network"));
+  DEBUG_VERBOSE(F("Disconnecting from Cellular Network"));
   _nb.shutdown();
   return NetworkConnectionState::DISCONNECTED;
 }
diff --git a/src/NotecardConnectionHandler.cpp b/src/NotecardConnectionHandler.cpp
index 466c74d..b6a6a71 100644
--- a/src/NotecardConnectionHandler.cpp
+++ b/src/NotecardConnectionHandler.cpp
@@ -140,7 +140,7 @@ int NotecardConnectionHandler::initiateNotehubSync (SyncType type_) const
 {
   int result;
 
-  Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s initiating Notehub sync..."), __FUNCTION__);
+  DEBUG_DEBUG(F("NotecardConnectionHandler::%s initiating Notehub sync..."), __FUNCTION__);
   if (J *req = _notecard.newRequest("hub.sync")) {
     if (type_ == SyncType::Inbound) {
       JAddBoolToObject(req, "in", true);
@@ -151,19 +151,19 @@ int NotecardConnectionHandler::initiateNotehubSync (SyncType type_) const
       // Check the response for errors
       if (NoteResponseError(rsp)) {
         const char *err = JGetString(rsp, "err");
-        Debug.print(DBG_ERROR, F("%s"), err);
+        DEBUG_ERROR(F("%s"), err);
         result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
       } else {
-        Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s successfully initiated Notehub sync."), __FUNCTION__);
+        DEBUG_DEBUG(F("NotecardConnectionHandler::%s successfully initiated Notehub sync."), __FUNCTION__);
         result = NotecardCommunicationError::NOTECARD_ERROR_NONE;
       }
       JDelete(rsp);
     } else {
-      Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+      DEBUG_ERROR(F("Failed to receive response from Notecard."));
       result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
     }
   } else {
-    Debug.print(DBG_ERROR, "Failed to allocate request: hub.sync");
+    DEBUG_ERROR("Failed to allocate request: hub.sync");
     result = NotecardCommunicationError::HOST_ERROR_OUT_OF_MEMORY;
   }
 
@@ -178,7 +178,7 @@ int NotecardConnectionHandler::setWiFiCredentials (const String & ssid_, const S
   const NetworkConnectionState current_net_connection_state = check();
   if (NetworkConnectionState::INIT == current_net_connection_state)
   {
-    Debug.print(DBG_ERROR, F("Unable to set Wi-Fi credentials. Connection to Notecard uninitialized."));
+    DEBUG_ERROR(F("Unable to set Wi-Fi credentials. Connection to Notecard uninitialized."));
     result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
   } else if (J *req = _notecard.newRequest("card.wifi")) {
     JAddStringToObject(req, "ssid", ssid_.c_str());
@@ -187,20 +187,20 @@ int NotecardConnectionHandler::setWiFiCredentials (const String & ssid_, const S
       // Check the response for errors
       if (NoteResponseError(rsp)) {
         const char *err = JGetString(rsp, "err");
-        Debug.print(DBG_ERROR, F("%s"), err);
-        Debug.print(DBG_ERROR, F("Failed to set Wi-Fi credentials."));
+        DEBUG_ERROR(F("%s"), err);
+        DEBUG_ERROR(F("Failed to set Wi-Fi credentials."));
         result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
       } else {
-        Debug.print(DBG_INFO, F("Wi-Fi credentials updated. ssid: \"%s\" password: \"%s\"."), ssid_.c_str(), password_.length() ? "**********" : "");
+        DEBUG_INFO(F("Wi-Fi credentials updated. ssid: \"%s\" password: \"%s\"."), ssid_.c_str(), password_.length() ? "**********" : "");
         result = NotecardCommunicationError::NOTECARD_ERROR_NONE;
       }
       JDelete(rsp);
     } else {
-      Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+      DEBUG_ERROR(F("Failed to receive response from Notecard."));
       result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
     }
   } else {
-    Debug.print(DBG_ERROR, F("Failed to allocate request: wifi.set"));
+    DEBUG_ERROR(F("Failed to allocate request: wifi.set"));
     result = NotecardCommunicationError::HOST_ERROR_OUT_OF_MEMORY;
   }
 
@@ -236,13 +236,13 @@ bool NotecardConnectionHandler::available()
         if (J *body = JGetObject(note, "body")) {
           _topic_type = static_cast<TopicType>(JGetInt(body, "topic"));
           if (_topic_type == TopicType::Invalid) {
-            Debug.print(DBG_WARNING, F("Note does not contain a topic"));
+            DEBUG_WARNING(F("Note does not contain a topic"));
           } else {
             buffered_data = JGetBinaryFromObject(note, "payload", &_inbound_buffer, &_inbound_buffer_size);
             if (!buffered_data) {
-              Debug.print(DBG_WARNING, F("Note does not contain payload data"));
+              DEBUG_WARNING(F("Note does not contain payload data"));
             } else {
-              Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s buffered payload with size: %d"), __FUNCTION__, _inbound_buffer_size);
+              DEBUG_DEBUG(F("NotecardConnectionHandler::%s buffered payload with size: %d"), __FUNCTION__, _inbound_buffer_size);
             }
           }
         } else {
@@ -263,7 +263,7 @@ unsigned long NotecardConnectionHandler::getTime()
   if (J *rsp = _notecard.requestAndResponse(_notecard.newRequest("card.time"))) {
     if (NoteResponseError(rsp)) {
       const char *err = JGetString(rsp, "err");
-      Debug.print(DBG_ERROR, F("%s\n"), err);
+      DEBUG_ERROR(F("%s\n"), err);
       result = 0;
     } else {
       result = JGetInt(rsp, "time");
@@ -298,7 +298,7 @@ int NotecardConnectionHandler::write(const uint8_t * buf_, size_t size_)
   if ((NetworkConnectionState::INIT == current_net_connection_state)
   || (NetworkConnectionState::ERROR == current_net_connection_state))
   {
-    Debug.print(DBG_ERROR, F("Unable to write message. Connection to Notecard uninitialized or in error state."));
+    DEBUG_ERROR(F("Unable to write message. Connection to Notecard uninitialized or in error state."));
     result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
   } else if (J * req = _notecard.newRequest("note.add")) {
     JAddStringToObject(req, "file", NOTEFILE_SECURE_OUTBOUND);
@@ -318,11 +318,11 @@ int NotecardConnectionHandler::write(const uint8_t * buf_, size_t size_)
         if (NoteErrorContains(err, "{hub-not-connected}")) {
           // _current_net_connection_state = NetworkConnectionState::DISCONNECTED;
         }
-        Debug.print(DBG_ERROR, F("%s\n"), err);
+        DEBUG_ERROR(F("%s\n"), err);
         result = NotecardCommunicationError::NOTECARD_ERROR_GENERIC;
       } else {
         result = NotecardCommunicationError::NOTECARD_ERROR_NONE;
-        Debug.print(DBG_INFO, F("Message sent correctly!"));
+        DEBUG_INFO(F("Message sent correctly!"));
       }
       JDelete(rsp);
     } else {
@@ -404,18 +404,18 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
         // Check the response for errors
         if (NoteResponseError(rsp)) {
           const char *err = JGetString(rsp, "err");
-          Debug.print(DBG_ERROR, F("%s"), err);
+          DEBUG_ERROR(F("%s"), err);
           result = NetworkConnectionState::ERROR;
         } else {
           result = NetworkConnectionState::INIT;
         }
         JDelete(rsp);
       } else {
-        Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+        DEBUG_ERROR(F("Failed to receive response from Notecard."));
         result = NetworkConnectionState::ERROR; // Assume the worst
       }
     } else {
-      Debug.print(DBG_ERROR, "Failed to allocate request: card.voltage");
+      DEBUG_ERROR("Failed to allocate request: card.voltage");
       result = NetworkConnectionState::ERROR; // Assume the worst
     }
   }
@@ -433,23 +433,23 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
           // Check the response for errors
           if (NoteResponseError(rsp)) {
             const char *err = JGetString(rsp, "err");
-            Debug.print(DBG_ERROR, F("%s"), err);
+            DEBUG_ERROR(F("%s"), err);
             result = NetworkConnectionState::ERROR;
           } else {
             result = NetworkConnectionState::INIT;
           }
           JDelete(rsp);
         } else {
-          Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+          DEBUG_ERROR(F("Failed to receive response from Notecard."));
           result = NetworkConnectionState::ERROR; // Assume the worst
         }
       } else {
-        Debug.print(DBG_ERROR, "Failed to allocate request: note.template:body");
+        DEBUG_ERROR("Failed to allocate request: note.template:body");
         JFree(req);
         result = NetworkConnectionState::ERROR; // Assume the worst
       }
     } else {
-      Debug.print(DBG_ERROR, "Failed to allocate request: note.template");
+      DEBUG_ERROR("Failed to allocate request: note.template");
       result = NetworkConnectionState::ERROR; // Assume the worst
     }
   }
@@ -466,23 +466,23 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
           // Check the response for errors
           if (NoteResponseError(rsp)) {
             const char *err = JGetString(rsp, "err");
-            Debug.print(DBG_ERROR, F("%s"), err);
+            DEBUG_ERROR(F("%s"), err);
             result = NetworkConnectionState::ERROR;
           } else {
             result = NetworkConnectionState::INIT;
           }
           JDelete(rsp);
         } else {
-          Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+          DEBUG_ERROR(F("Failed to receive response from Notecard."));
           result = NetworkConnectionState::ERROR; // Assume the worst
         }
       } else {
-        Debug.print(DBG_ERROR, "Failed to allocate request: note.template:body");
+        DEBUG_ERROR("Failed to allocate request: note.template:body");
         JFree(req);
         result = NetworkConnectionState::ERROR; // Assume the worst
       }
     } else {
-      Debug.print(DBG_ERROR, "Failed to allocate request: note.template");
+      DEBUG_ERROR("Failed to allocate request: note.template");
       result = NetworkConnectionState::ERROR; // Assume the worst
     }
   }
@@ -492,13 +492,13 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit()
     if (!updateUidCache()) {
       result = NetworkConnectionState::ERROR;
     } else {
-      Debug.print(DBG_INFO, F("Notecard has been initialized."));
+      DEBUG_INFO(F("Notecard has been initialized."));
       if (_keep_alive) {
         _conn_start_ms = ::millis();
-        Debug.print(DBG_INFO, F("Starting network connection..."));
+        DEBUG_INFO(F("Starting network connection..."));
         result = NetworkConnectionState::CONNECTING;
       } else {
-        Debug.print(DBG_INFO, F("Network is disconnected."));
+        DEBUG_INFO(F("Network is disconnected."));
         result = NetworkConnectionState::DISCONNECTED;
       }
     }
@@ -517,23 +517,23 @@ NetworkConnectionState NotecardConnectionHandler::update_handleConnecting()
   // Update the connection state
   if (!conn_status.connected_to_notehub) {
     if ((::millis() - _conn_start_ms) > NOTEHUB_CONN_TIMEOUT_MS) {
-      Debug.print(DBG_ERROR, F("Timeout exceeded, connection to the network failed."));
-      Debug.print(DBG_INFO, F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+      DEBUG_ERROR(F("Timeout exceeded, connection to the network failed."));
+      DEBUG_INFO(F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
       result = NetworkConnectionState::INIT;
     } else {
       // Continue awaiting the connection to Notehub
       if (conn_status.transport_connected) {
-        Debug.print(DBG_INFO, F("Establishing connection to Notehub..."));
+        DEBUG_INFO(F("Establishing connection to Notehub..."));
       } else {
-        Debug.print(DBG_INFO, F("Connecting to the network..."));
+        DEBUG_INFO(F("Connecting to the network..."));
       }
       result = NetworkConnectionState::CONNECTING;
     }
   } else {
-    Debug.print(DBG_INFO, F("Connected to Notehub!"));
+    DEBUG_INFO(F("Connected to Notehub!"));
     result = NetworkConnectionState::CONNECTED;
     if (initiateNotehubSync()) {
-      Debug.print(DBG_ERROR, F("Failed to initiate Notehub sync."));
+      DEBUG_ERROR(F("Failed to initiate Notehub sync."));
     }
   }
 
@@ -547,9 +547,9 @@ NetworkConnectionState NotecardConnectionHandler::update_handleConnected()
   const NotecardConnectionStatus conn_status = connected();
   if (!conn_status.connected_to_notehub) {
     if (!conn_status.transport_connected) {
-      Debug.print(DBG_ERROR, F("Connection to the network lost."));
+      DEBUG_ERROR(F("Connection to the network lost."));
     } else {
-      Debug.print(DBG_ERROR, F("Connection to Notehub lost."));
+      DEBUG_ERROR(F("Connection to Notehub lost."));
     }
     result = NetworkConnectionState::DISCONNECTED;
   } else {
@@ -563,7 +563,7 @@ NetworkConnectionState NotecardConnectionHandler::update_handleDisconnecting()
 {
   NetworkConnectionState result;
 
-  Debug.print(DBG_ERROR, F("Connection to the network lost."));
+  DEBUG_ERROR(F("Connection to the network lost."));
   result = NetworkConnectionState::DISCONNECTED;
 
   return result;
@@ -575,17 +575,17 @@ NetworkConnectionState NotecardConnectionHandler::update_handleDisconnected()
 
   if (_keep_alive)
   {
-    Debug.print(DBG_ERROR, F("Attempting reconnection..."));
+    DEBUG_ERROR(F("Attempting reconnection..."));
     result = NetworkConnectionState::INIT;
   }
   else
   {
     if (configureConnection(false)) {
       result = NetworkConnectionState::CLOSED;
-      Debug.print(DBG_INFO, F("Closing connection..."));
+      DEBUG_INFO(F("Closing connection..."));
     } else {
       result = NetworkConnectionState::ERROR;
-      Debug.print(DBG_INFO, F("Error closing connection..."));
+      DEBUG_INFO(F("Error closing connection..."));
     }
   }
 
@@ -608,23 +608,23 @@ bool NotecardConnectionHandler::armInterrupt (void) const
         // Check the response for errors
         if (NoteResponseError(rsp)) {
           const char *err = JGetString(rsp, "err");
-          Debug.print(DBG_ERROR, F("%s\n"), err);
+          DEBUG_ERROR(F("%s\n"), err);
           result = false;
         } else {
           result = true;
         }
         JDelete(rsp);
       } else {
-        Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+        DEBUG_ERROR(F("Failed to receive response from Notecard."));
         result = false;
       }
     } else {
-      Debug.print(DBG_ERROR, "Failed to allocate request: card.attn:files");
+      DEBUG_ERROR("Failed to allocate request: card.attn:files");
       JFree(req);
       result = false;
     }
   } else {
-    Debug.print(DBG_ERROR, "Failed to allocate request: card.attn");
+    DEBUG_ERROR("Failed to allocate request: card.attn");
     result = false;
   }
 
@@ -659,18 +659,18 @@ bool NotecardConnectionHandler::configureConnection (bool connect_) const
       // Check the response for errors
       if (NoteResponseError(rsp)) {
         const char *err = JGetString(rsp, "err");
-        Debug.print(DBG_ERROR, F("%s"), err);
+        DEBUG_ERROR(F("%s"), err);
         result = false;
       } else {
         result = true;
       }
       JDelete(rsp);
     } else {
-      Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+      DEBUG_ERROR(F("Failed to receive response from Notecard."));
       result = false; // Assume the worst
     }
   } else {
-    Debug.print(DBG_ERROR, "Failed to allocate request: hub.set");
+    DEBUG_ERROR("Failed to allocate request: hub.set");
     result = false; // Assume the worst
   }
 
@@ -686,7 +686,7 @@ uint_fast8_t NotecardConnectionHandler::connected (void) const
     // Ensure the transaction doesn't return an error
     if (NoteResponseError(rsp)) {
       const char *err = JGetString(rsp, "err");
-      Debug.print(DBG_ERROR, F("%s"),err);
+      DEBUG_ERROR(F("%s"),err);
       result.notecard_error = true;
     } else {
       // Parse the transport connection status
@@ -703,7 +703,7 @@ uint_fast8_t NotecardConnectionHandler::connected (void) const
     // Free the response
     JDelete(rsp);
   } else {
-    Debug.print(DBG_ERROR, F("Failed to acquire Notecard connection status."));
+    DEBUG_ERROR(F("Failed to acquire Notecard connection status."));
     result.transport_connected = false;
     result.connected_to_notehub = false;
     result.notecard_error = false;
@@ -744,11 +744,11 @@ J * NotecardConnectionHandler::getNote (bool pop_) const
         result = note;
       }
     } else {
-      Debug.print(DBG_ERROR, F("Failed to receive response from Notecard."));
+      DEBUG_ERROR(F("Failed to receive response from Notecard."));
       result = nullptr;
     }
   } else {
-    Debug.print(DBG_ERROR, "Failed to allocate request: note.get");
+    DEBUG_ERROR("Failed to allocate request: note.get");
     // Failed to retrieve a Note, therefore no Note is available.
     result = nullptr;
   }
@@ -769,8 +769,8 @@ bool NotecardConnectionHandler::updateUidCache (void)
     // Check the response for errors
     if (NoteResponseError(rsp)) {
       const char *err = JGetString(rsp, "err");
-      Debug.print(DBG_ERROR, F("Failed to read Notecard UID"));
-      Debug.print(DBG_ERROR, F("Error: %s"), err);
+      DEBUG_ERROR(F("Failed to read Notecard UID"));
+      DEBUG_ERROR(F("Error: %s"), err);
       result = false;
     } else {
       _notecard_uid = JGetString(rsp, "device");
@@ -778,14 +778,14 @@ bool NotecardConnectionHandler::updateUidCache (void)
       if (NoteGetEnv("_arduino_device_id", device_id, device_id, sizeof(device_id))) {
         _device_id = device_id;
       } else {
-        Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s Arduino Device ID not cached on Notecard, using default value: <%s>"), __FUNCTION__, _device_id.c_str());
+        DEBUG_DEBUG(F("NotecardConnectionHandler::%s Arduino Device ID not cached on Notecard, using default value: <%s>"), __FUNCTION__, _device_id.c_str());
       }
-      Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s updated local cache with Notecard UID: <%s> and Arduino Device ID: <%s>"), __FUNCTION__, _notecard_uid.c_str(), _device_id.c_str());
+      DEBUG_DEBUG(F("NotecardConnectionHandler::%s updated local cache with Notecard UID: <%s> and Arduino Device ID: <%s>"), __FUNCTION__, _notecard_uid.c_str(), _device_id.c_str());
       result = true;
     }
     JDelete(rsp);
   } else {
-    Debug.print(DBG_ERROR, F("Failed to read Notecard UID"));
+    DEBUG_ERROR(F("Failed to read Notecard UID"));
     result = false;
   }
 
diff --git a/src/WiFiConnectionHandler.cpp b/src/WiFiConnectionHandler.cpp
index 37d3ff6..78d0b35 100644
--- a/src/WiFiConnectionHandler.cpp
+++ b/src/WiFiConnectionHandler.cpp
@@ -67,28 +67,28 @@ unsigned long WiFiConnectionHandler::getTime()
 NetworkConnectionState WiFiConnectionHandler::update_handleInit()
 {
 #if !defined(__AVR__)
-  Debug.print(DBG_INFO, F("WiFi.status(): %d"), WiFi.status());
+  DEBUG_INFO(F("WiFi.status(): %d"), WiFi.status());
 #endif
 
 #if !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
   if (WiFi.status() == NETWORK_HARDWARE_ERROR)
   {
 #if !defined(__AVR__)
-    Debug.print(DBG_ERROR, F("WiFi Hardware failure.\nMake sure you are using a WiFi enabled board/shield."));
-    Debug.print(DBG_ERROR, F("Then reset and retry."));
+    DEBUG_ERROR(F("WiFi Hardware failure.\nMake sure you are using a WiFi enabled board/shield."));
+    DEBUG_ERROR(F("Then reset and retry."));
 #endif
     return NetworkConnectionState::ERROR;
   }
 #if !defined(__AVR__)
-  Debug.print(DBG_INFO, F("Current WiFi Firmware: %s"), WiFi.firmwareVersion());
+  DEBUG_INFO(F("Current WiFi Firmware: %s"), WiFi.firmwareVersion());
 #endif
 
 #if defined(WIFI_FIRMWARE_VERSION_REQUIRED)
   if (String(WiFi.firmwareVersion()) < String(WIFI_FIRMWARE_VERSION_REQUIRED))
   {
 #if !defined(__AVR__)
-    Debug.print(DBG_ERROR, F("Latest WiFi Firmware: %s"), WIFI_FIRMWARE_VERSION_REQUIRED);
-    Debug.print(DBG_ERROR, F("Please update to the latest version for best performance."));
+    DEBUG_ERROR(F("Latest WiFi Firmware: %s"), WIFI_FIRMWARE_VERSION_REQUIRED);
+    DEBUG_ERROR(F("Please update to the latest version for best performance."));
 #endif
     delay(5000);
   }
@@ -113,15 +113,15 @@ NetworkConnectionState WiFiConnectionHandler::update_handleInit()
   if (WiFi.status() != NETWORK_CONNECTED)
   {
 #if !defined(__AVR__)
-    Debug.print(DBG_ERROR, F("Connection to \"%s\" failed"), _settings.wifi.ssid);
-    Debug.print(DBG_INFO, F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::INIT)]);
+    DEBUG_ERROR(F("Connection to \"%s\" failed"), _settings.wifi.ssid);
+    DEBUG_INFO(F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::INIT)]);
 #endif
     return NetworkConnectionState::INIT;
   }
   else
   {
 #if !defined(__AVR__)
-    Debug.print(DBG_INFO, F("Connected to \"%s\""), _settings.wifi.ssid);
+    DEBUG_INFO(F("Connected to \"%s\""), _settings.wifi.ssid);
 #endif
 #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
   configTime(0, 0, "time.arduino.cc", "pool.ntp.org", "time.nist.gov");
@@ -142,15 +142,15 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnecting()
 
   #if !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
   int ping_result = WiFi.ping("time.arduino.cc");
-  Debug.print(DBG_INFO, F("WiFi.ping(): %d"), ping_result);
+  DEBUG_INFO(F("WiFi.ping(): %d"), ping_result);
   if (ping_result < 0)
   {
-    Debug.print(DBG_ERROR, F("Internet check failed"));
-    Debug.print(DBG_INFO, F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
+    DEBUG_ERROR(F("Internet check failed"));
+    DEBUG_INFO(F("Retrying in  \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
     return NetworkConnectionState::CONNECTING;
   }
   #endif
-  Debug.print(DBG_INFO, F("Connected to Internet"));
+  DEBUG_INFO(F("Connected to Internet"));
   return NetworkConnectionState::CONNECTED;
 
 }
@@ -160,13 +160,13 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnected()
   if (WiFi.status() != WL_CONNECTED)
   {
 #if !defined(__AVR__)
-    Debug.print(DBG_VERBOSE, F("WiFi.status(): %d"), WiFi.status());
-    Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _settings.wifi.ssid);
+    DEBUG_VERBOSE(F("WiFi.status(): %d"), WiFi.status());
+    DEBUG_ERROR(F("Connection to \"%s\" lost."), _settings.wifi.ssid);
 #endif
     if (_keep_alive)
     {
 #if !defined(__AVR__)
-      Debug.print(DBG_INFO, F("Attempting reconnection"));
+      DEBUG_INFO(F("Attempting reconnection"));
 #endif
     }