You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* These can be commented out to enable/disable printing of the associated debug messages. */
22
22
#defineLOG_ERROR/* Messages indicating that something has definitely gone wrong. */
23
23
#defineLOG_WARNING/* Messages indicating that something 'might' have gone wrong, but either isn't immidietely critical or is only a problem in certain contexts. */
@@ -35,21 +35,33 @@
35
35
36
36
/* PRINTLN_ERROR() */
37
37
#if defined(LOG_ERROR) && !defined(NO_LOG)
38
-
#definePRINTLN_ERROR(message, ...) printf("[%s/%s()] ERROR: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an ERROR message in the format: "[file_name.c/function()] ERROR: {message}"*/
printf("[%s/%s()] ERROR: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an ERROR message in the format: "[file_name.c/function()] ERROR: {message}"*/
42
+
_Pragma("GCC diagnostic pop")
39
43
#else
40
44
#definePRINTLN_ERROR(message, ...) /* If debugging is turned off, macro doesn't need to expand to anything. */
41
45
#endif
42
46
43
47
/* PRINTLN_WARNING() */
44
48
#if defined(LOG_WARNING) && !defined(NO_LOG)
45
-
#definePRINTLN_WARNING(message, ...) printf("[%s/%s()] WARNING: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints a WARNING message in the format: "[file_name.c/function()] WARNING: {message}"*/
printf("[%s/%s()] WARNING: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints a WARNING message in the format: "[file_name.c/function()] WARNING: {message}"*/
53
+
_Pragma("GCC diagnostic pop")
46
54
#else
47
55
#definePRINTLN_WARNING(message, ...) /* If debugging is turned off, macro doesn't need to expand to anything. */
48
56
#endif
49
57
50
58
/* PRINTLN_INFO() */
51
59
#if defined(LOG_INFO) && !defined(NO_LOG)
52
-
#definePRINTLN_INFO(message, ...) printf("[%s/%s()] INFO: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an INFO message in the format: "[file_name.c/function()] INFO: {message}"*/
printf("[%s/%s()] INFO: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an INFO message in the format: "[file_name.c/function()] INFO: {message}"*/
64
+
_Pragma("GCC diagnostic pop")
53
65
#else
54
66
#definePRINTLN_INFO(message, ...) /* If debugging is turned off, macro doesn't need to expand to anything. */
55
67
#endif
@@ -58,8 +70,8 @@
58
70
* @brief Checks if a function is successful when called. Prints an error message if it fails.
0 commit comments