Permalink
Browse files

Reinstate the MR_LOGGING_ENABLED compile time checks for logging

  • Loading branch information...
1 parent 8b4cd99 commit c7da2ec1069167ad21b3162785c34e45378218d6 @tonyarnold tonyarnold committed May 17, 2014
Showing with 18 additions and 0 deletions.
  1. +18 −0 MagicalRecord/Core/MagicalRecordLogging.h
@@ -19,6 +19,8 @@
#define LOG_ASYNC_INFO (YES && LOG_ASYNC_ENABLED)
#define LOG_ASYNC_VERBOSE (YES && LOG_ASYNC_ENABLED)
+#ifdef MR_LOGGING_ENABLED
+
#ifndef LOG_MACRO
#define LOG_MACRO(isAsynchronous, lvl, flg, ctx, atag, fnct, frmt, ...) \
@@ -47,5 +49,21 @@
#define MRLogCInfo(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_INFO, [MagicalRecord loggingMask], MagicalRecordLogLevelInfo, 0, frmt, ##__VA_ARGS__)
#define MRLogCVerbose(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_VERBOSE, [MagicalRecord loggingMask], MagicalRecordLogLevelVerbose, 0, frmt, ##__VA_ARGS__)
+#else
+
+#define MRLogFatal(frmt, ...) ((void)0)
+#define MRLogError(frmt, ...) ((void)0)
+#define MRLogWarn(frmt, ...) ((void)0)
+#define MRLogInfo(frmt, ...) ((void)0)
+#define MRLogVerbose(frmt, ...) ((void)0)
+
+#define MRLogCFatal(frmt, ...) ((void)0)
+#define MRLogCError(frmt, ...) ((void)0)
+#define MRLogCWarn(frmt, ...) ((void)0)
+#define MRLogCInfo(frmt, ...) ((void)0)
+#define MRLogCVerbose(frmt, ...) ((void)0)
+
+#endif
+
#endif

0 comments on commit c7da2ec

Please sign in to comment.