]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Log.hh
sleep forever bug fixed
[chaz/yoink] / src / Moof / Log.hh
index cdd5cd4e751e8e4374b94babbcc2be10f249f991..221827f4eb86fcbcb03e4b6b628124b48e6dc8d4 100644 (file)
@@ -37,7 +37,6 @@
  */
 
 #include <cstdlib>             // exit
  */
 
 #include <cstdlib>             // exit
-#include <cstring>             // strerror
 
 
 /**
 
 
 /**
  * @param X test to perform
  */
 
  * @param X test to perform
  */
 
-#if ! NDEBUG
+#undef ASSERT
+
+#if NDEBUG
+#define ASSERT(X)
+#else
 #define ASSERT(X) if (!(X)) Mf::logError("false assertion at %s:%d, " #X, \
                __FILE__, __LINE__), exit(1)
 #define ASSERT(X) if (!(X)) Mf::logError("false assertion at %s:%d, " #X, \
                __FILE__, __LINE__), exit(1)
-#else
-#define ASSERT(X)
 #endif
 
 
 #endif
 
 
@@ -67,8 +68,9 @@ enum LogLevel
        LOG_NONE                = -1,           ///< Disable all logging.
        LOG_ERROR               =  1,           ///< Log only errors.
        LOG_WARNING             =  2,           ///< Log warnings and errors.
        LOG_NONE                = -1,           ///< Disable all logging.
        LOG_ERROR               =  1,           ///< Log only errors.
        LOG_WARNING             =  2,           ///< Log warnings and errors.
-       LOG_INFO                =  3,           ///< Log info, warnings, errors.
-       LOG_DEBUG               =  4            ///< Log all messages.
+       LOG_SCRIPT              =  3,           ///< Log messages from Lua, too.
+       LOG_INFO                =  4,           ///< Log info, warnings, errors.
+       LOG_DEBUG               =  5,           ///< Log all messages.
 };
 
 
 };
 
 
@@ -114,6 +116,11 @@ void logInfo(const char* fmt, ...);
 
 void logDebug(const char* fmt, ...);
 
 
 void logDebug(const char* fmt, ...);
 
+void logScript(const char* fmt, ...);
+class Script;
+int logScript(Script& script);
+void importLogScript(Script& script);
+
 
 } // namespace Mf
 
 
 } // namespace Mf
 
This page took 0.018207 seconds and 4 git commands to generate.