config.h.in
changeset 6 90073cbb535d
parent 5 e617c9cf6dd3
child 23 13f03e604c8a
--- a/config.h.in	Mon Feb 16 01:32:12 2009 +0200
+++ b/config.h.in	Fri Feb 20 23:07:43 2009 +0200
@@ -5,11 +5,25 @@
 // define this to enable debugging output
 #cmakedefine DEBUG
 
+// define this, if your loudmouth have lm_connection_get_keep_alive_rate ()
+#cmakedefine HAVE_LM_CONNECTION_GET_KEEP_ALIVE_RATE
+
 #ifdef DEBUG
-#include <stdio.h>
-#define D(FORMAT...) { fprintf ( stderr, FORMAT ); }
+#  include <stdio.h>
+
+#  ifndef LLM_LOG_PREFIX
+#    define LLM_LOG_PREFIX ( "lua-lm" )
+#  endif
+
+#  define D(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_DEBUG, FORMAT); }
+#  define I(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_INFO, FORMAT); }
+#  define W(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_WARNING, FORMAT); }
+#  define E(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_ERROR, FORMAT); }
 #else
-#define D(FORMAT...) { /* FORMAT */ }
+#  define D(FORMAT...) { /* FORMAT */ }
+#  define I(FORMAT...) { /* FORMAT */ }
+#  define W(FORMAT...) { /* FORMAT */ }
+#  define E(FORMAT...) { /* FORMAT */ }
 #endif
 
 #endif