aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/misc_log_ex.h
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-09-24 10:57:55 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-09-24 10:57:55 -0500
commitcb6f96b9d13812b819b6fc5960e5851098554fba (patch)
treee4292e2f3ce5b77908bea51fd7113015078c312e /contrib/epee/include/misc_log_ex.h
parentMerge pull request #5916 (diff)
parentepee: misc_log_ex.h can now be used in C code (diff)
downloadmonero-cb6f96b9d13812b819b6fc5960e5851098554fba.tar.xz
Merge pull request #5909
8933955 epee: misc_log_ex.h can now be used in C code (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/misc_log_ex.h')
-rw-r--r--contrib/epee/include/misc_log_ex.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h
index 0b216f2c4..3be335e85 100644
--- a/contrib/epee/include/misc_log_ex.h
+++ b/contrib/epee/include/misc_log_ex.h
@@ -28,6 +28,8 @@
#ifndef _MISC_LOG_EX_H_
#define _MISC_LOG_EX_H_
+#ifdef __cplusplus
+
#include <string>
#include "easylogging++.h"
@@ -220,4 +222,28 @@ void set_console_color(int color, bool bright);
void reset_console_color();
}
+
+extern "C"
+{
+
+#endif
+
+#ifdef __GNUC__
+#define ATTRIBUTE_PRINTF __attribute__((format(printf, 2, 3)))
+#else
+#define ATTRIBUTE_PRINTF
+#endif
+
+bool merror(const char *category, const char *format, ...) ATTRIBUTE_PRINTF;
+bool mwarning(const char *category, const char *format, ...) ATTRIBUTE_PRINTF;
+bool minfo(const char *category, const char *format, ...) ATTRIBUTE_PRINTF;
+bool mdebug(const char *category, const char *format, ...) ATTRIBUTE_PRINTF;
+bool mtrace(const char *category, const char *format, ...) ATTRIBUTE_PRINTF;
+
+#ifdef __cplusplus
+
+}
+
+#endif
+
#endif //_MISC_LOG_EX_H_