[Groonga-mysql-commit] mroonga/mroonga [master] Make class name in debug print customizable

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 23 17:19:41 JST 2012


Kouhei Sutou	2012-10-23 17:19:41 +0900 (Tue, 23 Oct 2012)

  New Revision: 463e8ca879a921cbe29c223a0c5a63f84a7ca1cc
  https://github.com/mroonga/mroonga/commit/463e8ca879a921cbe29c223a0c5a63f84a7ca1cc

  Log:
    Make class name in debug print customizable

  Modified files:
    ha_mroonga.cpp
    lib/mrn_index_table_name.cpp
    mrn_mysql.h

  Modified: ha_mroonga.cpp (+3 -0)
===================================================================
--- ha_mroonga.cpp    2012-10-23 16:39:13 +0900 (43951a5)
+++ ha_mroonga.cpp    2012-10-23 17:19:41 +0900 (bb20aae)
@@ -63,6 +63,9 @@
 #include <mrn_external_lock.hpp>
 #include <mrn_match_escalation_threshold_scope.hpp>
 
+// for debug
+#define MRN_CLASS_NAME "ha_mroonga"
+
 #define MRN_SHORT_TEXT_SIZE (1 << 12) //  4Kbytes
 #define MRN_TEXT_SIZE       (1 << 16) // 64Kbytes
 #define MRN_LONG_TEXT_SIZE  (1 << 31) //  2Gbytes

  Modified: lib/mrn_index_table_name.cpp (+3 -0)
===================================================================
--- lib/mrn_index_table_name.cpp    2012-10-23 16:39:13 +0900 (00f5f96)
+++ lib/mrn_index_table_name.cpp    2012-10-23 17:19:41 +0900 (c050c3f)
@@ -22,6 +22,9 @@
 
 #include "mrn_index_table_name.hpp"
 
+// for debug
+#define MRN_CLASS_NAME "mrn::IndexTableName"
+
 namespace mrn {
   IndexTableName::IndexTableName(const char *table_name,
                                  const char *mysql_index_name)

  Modified: mrn_mysql.h (+2 -1)
===================================================================
--- mrn_mysql.h    2012-10-23 16:39:13 +0900 (b975f89)
+++ mrn_mysql.h    2012-10-23 17:19:41 +0900 (ecff6c5)
@@ -66,7 +66,8 @@
 #  define MRN_DBUG_ENTER_METHOD()                 \
     char method_name[MRN_MESSAGE_BUFFER_SIZE];    \
     method_name[0] = '\0';                        \
-    strcat(method_name, "ha_mroonga::");          \
+    strcat(method_name, MRN_CLASS_NAME);          \
+    strcat(method_name, "::");                    \
     strcat(method_name, __FUNCTION__);            \
     DBUG_ENTER(method_name)
 #else
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index