]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Log.hh
fixed permissions for stlplus files
[chaz/yoink] / src / Moof / Log.hh
index 3f6b6d7e45013b8360af975288d03082c6ed0d91..d3aa555aac4c5fa4b81076de90a595612ca28883 100644 (file)
@@ -37,7 +37,6 @@
  */
 
 #include <cstdlib>             // exit
-#include <cstring>             // strerror
 
 
 /**
  * @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)
-#else
-#define ASSERT(X)
 #endif
 
 
@@ -62,13 +63,15 @@ namespace Mf {
  * @see LogLevel()
  */
 
-typedef enum {
-       NONE            = -1,           ///< Disable all logging.
-       ERROR           =  1,           ///< Log only errors.
-       WARNING         =  2,           ///< Log warnings and errors.
-       INFO            =  3,           ///< Log info, warnings, errors.
-       DEBUGGING       =  4            ///< Log all messages.
-} LogLevel;
+enum LogLevel
+{
+       LOG_NONE                = -1,           ///< Disable all logging.
+       LOG_ERROR               =  1,           ///< Log only errors.
+       LOG_WARNING             =  2,           ///< Log warnings and errors.
+       LOG_SCRIPT              =  3,           ///< Log messages from Lua, too.
+       LOG_INFO                =  4,           ///< Log info, warnings, errors.
+       LOG_DEBUG               =  5,           ///< Log all messages.
+};
 
 
 /**
@@ -113,6 +116,11 @@ void logInfo(const char* fmt, ...);
 
 void logDebug(const char* fmt, ...);
 
+void logScript(const char* fmt, ...);
+class Script;
+int logScript(Script& script);
+void importLogPrintFunction(Script& script);
+
 
 } // namespace Mf
 
This page took 0.01797 seconds and 4 git commands to generate.