diff gen/logger.h @ 38:27b2f40bdb58 trunk

[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back. Fiddled a bit the the testing system. Added a very simple SDL graphics demo.
author lindquist
date Wed, 10 Oct 2007 06:16:48 +0200
parents c53b6e3fe49a
children 61615fa85940
line wrap: on
line diff
--- a/gen/logger.h	Wed Oct 10 03:38:24 2007 +0200
+++ b/gen/logger.h	Wed Oct 10 06:16:48 2007 +0200
@@ -5,44 +5,30 @@
 
 namespace Logger
 {
-    #ifndef LLVMD_NO_LOGGER
     void indent();
     void undent();
     std::ostream& cout();
-    void println(const char* fmt,...);
-    void print(const char* fmt,...);
-    #else
-    inline void indent() {}
-    inline void undent() {}
-    inline std::ostream& cout() { return std::cout; }
-    inline void println(const char* fmt, ...) {}
-    inline void print(const char* fmt, ...) {}
-    #endif
+    void println(const char* fmt, ...);
+    void print(const char* fmt, ...);
+    void enable();
+    void disable();
+    
 
     struct LoggerScope
     {
         LoggerScope()
         {
-            #ifndef LLVMD_NO_LOGGER
-            //std::cout << "-->indented\n";
             Logger::indent();
-            #endif
             
         }
         ~LoggerScope()
         {
-            #ifndef LLVMD_NO_LOGGER
-            //std::cout << "<--undented\n";
             Logger::undent();
-            #endif
         }
     };
 }
 
-#ifndef LLVMD_NO_LOGGER
 #define LOG_SCOPE    Logger::LoggerScope _logscope;
-#else
-#define LOG_SCOPE
+
 #endif
 
-#endif