We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 998ff70 commit 2150b3cCopy full SHA for 2150b3c
Util/log.h
@@ -0,0 +1,22 @@
1
+/*****************************************************************//**
2
+ * \file log.h
3
+ * \brief Custom LOG() macro to print location of the function call
4
+ * with __VA_ARGS__ and fprintf() in C.
5
+ *
6
+ * \author Xuhua Huang
7
+ * \date October 2021
8
+ *********************************************************************/
9
+
10
+#ifndef LOG_H
11
+#define LOG_H
12
13
+#include <stdio.h>
14
15
+/* Global Macro Definition */
16
+#define LOG(...) {\
17
+ fprintf(stderr, "%s: Line %d:\t", __FILE__, __LINE__);\
18
+ fprintf(stderr, __VA_ARGS__);\
19
+ fprintf(stderr, "\n");\
20
+}
21
22
+#endif
0 commit comments