trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jplev...@apache.org
Subject svn commit: r899311 - in /incubator/trafficserver/traffic/branches/dev: configure.ac libinktomi++/Diags.h proxy/Main.cc proxy/mgmt2/Main.cc
Date Thu, 14 Jan 2010 17:21:47 GMT
Author: jplevyak
Date: Thu Jan 14 17:21:46 2010
New Revision: 899311

URL: http://svn.apache.org/viewvc?rev=899311&view=rev
Log:
TS-107: add --enable-diags configure flag, default diags on in debug and off in non-debug

Modified:
    incubator/trafficserver/traffic/branches/dev/configure.ac
    incubator/trafficserver/traffic/branches/dev/libinktomi++/Diags.h
    incubator/trafficserver/traffic/branches/dev/proxy/Main.cc
    incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Main.cc

Modified: incubator/trafficserver/traffic/branches/dev/configure.ac
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/configure.ac?rev=899311&r1=899310&r2=899311&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/configure.ac (original)
+++ incubator/trafficserver/traffic/branches/dev/configure.ac Thu Jan 14 17:21:46 2010
@@ -69,6 +69,21 @@
 )
 
 #
+# Diags
+#
+
+AC_MSG_CHECKING([whether to enable diags])
+AC_ARG_ENABLE([diags],
+  [AS_HELP_STRING([--enable-diags],[turn on diags])],
+  [],
+  [enable_diags=$enable_debug]
+)
+AC_MSG_RESULT([$enable_diags])
+AS_IF([test "x$enable_diags" = "xyes"],
+  [AC_DEFINE([USE_DIAGS])]
+)
+
+#
 # Purify
 #
 

Modified: incubator/trafficserver/traffic/branches/dev/libinktomi++/Diags.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/libinktomi%2B%2B/Diags.h?rev=899311&r1=899310&r2=899311&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/libinktomi++/Diags.h (original)
+++ incubator/trafficserver/traffic/branches/dev/libinktomi++/Diags.h Thu Jan 14 17:21:46
2010
@@ -44,6 +44,10 @@
 
 #define DIAGS_MAGIC 0x12345678
 
+#if !defined(USE_DIAGS)
+#define NO_DIAG 1
+#endif
+
 // eInsertStringType - defined in ink_error.h //
 //typedef enum
 //{
@@ -84,12 +88,6 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#if 1
-#undef NO_DIAGS
-#else
-#define NO_DIAGS 1
-#endif
-
 
 class Diags;
 

Modified: incubator/trafficserver/traffic/branches/dev/proxy/Main.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/Main.cc?rev=899311&r1=899310&r2=899311&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/Main.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/Main.cc Thu Jan 14 17:21:46 2010
@@ -256,10 +256,12 @@
    "T",
    &run_test_hook, "PROXY_RUN_TEST_HOOK", NULL},
 #endif //INK_NO_TESTS
+#ifndef NO_DIAGS
   {"debug_tags", 'T', "Vertical-bar-separated Debug Tags", "S1023", error_tags,
    "PROXY_DEBUG_TAGS", NULL},
   {"action_tags", 'B', "Vertical-bar-separated Behavior Tags", "S1023", action_tags,
    "PROXY_BEHAVIOR_TAGS", NULL},
+#endif
   {"interval", 'i', "Statistics Interval", "I", &show_statistics,
    "PROXY_STATS_INTERVAL", NULL},
   {"remote_management", 'M', "Remote Management", "T",

Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Main.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Main.cc?rev=899311&r1=899310&r2=899311&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Main.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Main.cc Thu Jan 14 17:21:46 2010
@@ -483,6 +483,7 @@
           } else if (strcmp(argv[i], "-clusterRSPort") == 0) {
             ++i;
             cluster_server_port = atoi(argv[i]);
+#ifndef NO_DIAGS
           } else if (strcmp(argv[i], "-debug") == 0) {
             ++i;
             strncpy(debug_tags, argv[i], 1023);
@@ -491,6 +492,7 @@
             ++i;
             strncpy(action_tags, argv[i], 1023);
             action_tags[1023] = '\0';
+#endif
           } else if (strcmp(argv[i], "-path") == 0) {
             ++i;
             //bugfixed by YTS Team, yamsat(id-59703)



Mime
View raw message