Library to implement various levels of messages in cpp files

Dependents:   IoT_Ex BatteryModelTester BatteryModelTester

Files at this revision

API Documentation at this revision

Comitter:
defrost
Date:
Thu May 11 17:09:06 2017 +0000
Parent:
8:7017082b1f18
Commit message:
- Added line numbers to all messages

Changed in this revision

messages.h Show annotated file Show diff for this revision Revisions of this file
diff -r 7017082b1f18 -r 6821aa3ca776 messages.h
--- a/messages.h	Wed Apr 26 13:22:27 2017 +0000
+++ b/messages.h	Thu May 11 17:09:06 2017 +0000
@@ -68,19 +68,19 @@
 #endif
 
 #ifdef ERRMESSAGES
-#define ERR(serPort, x, ...) serPort->printf("["FUNCNAME" : ERR] "x"\r\n", ##__VA_ARGS__);
+#define ERR(serPort, x, ...) serPort->printf("["FUNCNAME" : ERR] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__);
 #else
 #define ERR(x, ...)
 #endif
 
 #ifdef WARNMESSAGES
-#define WARN(serPort, x, ...) serPort->printf("["FUNCNAME" : WARN] "x"\r\n", ##__VA_ARGS__);
+#define WARN(serPort, x, ...) serPort->printf("["FUNCNAME" : WARN] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__);
 #else
 #define WARN(x, ...)
 #endif
 
 #ifdef INFOMESSAGES
-#define INFO(serPort, x, ...) serPort->printf("["FUNCNAME" : INFO] "x"\r\n", ##__VA_ARGS__);
+#define INFO(serPort, x, ...) serPort->printf("["FUNCNAME" : INFO] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__);
 #else
 #define INFO(x, ...)
 #endif