diff --git a/src/TinyGsmCommon.h b/src/TinyGsmCommon.h index ee71511..b803651 100644 --- a/src/TinyGsmCommon.h +++ b/src/TinyGsmCommon.h @@ -49,15 +49,23 @@ #ifdef TINY_GSM_DEBUG namespace { template - static void DBG(T last) { + static void DBG_PLAIN(T last) { TINY_GSM_DEBUG.println(last); } template - static void DBG(T head, Args... tail) { + static void DBG_PLAIN(T head, Args... tail) { TINY_GSM_DEBUG.print(head); TINY_GSM_DEBUG.print(' '); - DBG(tail...); + DBG_PLAIN(tail...); + } + + template + static void DBG(Args... args) { + TINY_GSM_DEBUG.print(GF("[")); + TINY_GSM_DEBUG.print(millis()); + TINY_GSM_DEBUG.print(GF("] ")); + DBG_PLAIN(args...); } } #else