aboutsummaryrefslogtreecommitdiff
path: root/src/main/extractor_logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/extractor_logging.h')
-rw-r--r--src/main/extractor_logging.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/extractor_logging.h b/src/main/extractor_logging.h
index 5db9ae1..535a9a7 100644
--- a/src/main/extractor_logging.h
+++ b/src/main/extractor_logging.h
@@ -44,7 +44,7 @@ EXTRACTOR_log_ (const char *file, int line, const char *format, ...);
44 * 44 *
45 * @param ... format string and arguments for fmt (printf-style) 45 * @param ... format string and arguments for fmt (printf-style)
46 */ 46 */
47#define LOG(...) EXTRACTOR_log_(__FILE__, __LINE__, __VA_ARGS__) 47#define LOG(...) EXTRACTOR_log_ (__FILE__, __LINE__, __VA_ARGS__)
48 48
49#else 49#else
50 50
@@ -64,7 +64,8 @@ EXTRACTOR_log_ (const char *file, int line, const char *format, ...);
64 * 64 *
65 * @param syscall name of the syscall that failed 65 * @param syscall name of the syscall that failed
66 */ 66 */
67#define LOG_STRERROR(syscall) LOG("System call `%s' failed: %s\n", syscall, STRERROR (errno)) 67#define LOG_STRERROR(syscall) LOG ("System call `%s' failed: %s\n", syscall, \
68 STRERROR (errno))
68 69
69 70
70/** 71/**
@@ -74,7 +75,9 @@ EXTRACTOR_log_ (const char *file, int line, const char *format, ...);
74 * @param syscall name of the syscall that failed 75 * @param syscall name of the syscall that failed
75 * @param filename name of the file that was involved 76 * @param filename name of the file that was involved
76 */ 77 */
77#define LOG_STRERROR_FILE(syscall,filename) LOG("System call `%s' failed for file `%s': %s\n", syscall, filename, STRERROR (errno)) 78#define LOG_STRERROR_FILE(syscall,filename) LOG ( \
79 "System call `%s' failed for file `%s': %s\n", syscall, filename, STRERROR ( \
80 errno))
78 81
79 82
80/** 83/**
@@ -85,7 +88,7 @@ EXTRACTOR_log_ (const char *file, int line, const char *format, ...);
85 */ 88 */
86void 89void
87EXTRACTOR_abort_ (const char *file, 90EXTRACTOR_abort_ (const char *file,
88 int line); 91 int line);
89 92
90 93
91/** 94/**
@@ -93,7 +96,8 @@ EXTRACTOR_abort_ (const char *file,
93 * 96 *
94 * @param cond assertion that must hold. 97 * @param cond assertion that must hold.
95 */ 98 */
96#define ASSERT(cond) do { if (! (cond)) EXTRACTOR_abort_ (__FILE__, __LINE__); } while (0) 99#define ASSERT(cond) do { if (! (cond)) EXTRACTOR_abort_ (__FILE__, __LINE__); \
100} while (0)
97 101
98 102
99#endif 103#endif