You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/07/23 01:56:43 UTC

[03/11] git commit: TS-2041: move records logging to RecDebug.cc

TS-2041: move records logging to RecDebug.cc

We will need RecLog and friends to link traffic_cop, so split them
out to avoid dragging in a lot of dependencies.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8bd2dc6f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8bd2dc6f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8bd2dc6f

Branch: refs/heads/master
Commit: 8bd2dc6f28efbc951d5e1ecf64fd01157f6ead92
Parents: 2f043bc
Author: James Peach <jp...@apache.org>
Authored: Fri Jul 19 11:50:37 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon Jul 22 16:46:13 2013 -0700

----------------------------------------------------------------------
 lib/records/Makefile.am |  2 ++
 lib/records/RecDebug.cc | 66 ++++++++++++++++++++++++++++++++++++++++++++
 lib/records/RecUtils.cc | 41 ---------------------------
 3 files changed, 68 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8bd2dc6f/lib/records/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/records/Makefile.am b/lib/records/Makefile.am
index ae35740..6e96118 100644
--- a/lib/records/Makefile.am
+++ b/lib/records/Makefile.am
@@ -58,6 +58,7 @@ libreclocal_a_SOURCES = \
   I_RecHttp.h \
   RecHttp.cc \
   RecUtils.cc \
+  RecDebug.cc \
   RecConfigParse.cc
 
 librecprocess_a_CXXFLAGS = $(ink_with_modules_process)
@@ -87,5 +88,6 @@ librecprocess_a_SOURCES = \
   I_RecHttp.h \
   RecHttp.cc \
   RecUtils.cc \
+  RecDebug.cc \
   RecConfigParse.cc
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8bd2dc6f/lib/records/RecDebug.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecDebug.cc b/lib/records/RecDebug.cc
new file mode 100644
index 0000000..ec7f5da
--- /dev/null
+++ b/lib/records/RecDebug.cc
@@ -0,0 +1,66 @@
+/** @file
+
+  Record debug and logging
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#include "P_RecUtils.h"
+#include "P_RecCore.h"
+
+//-------------------------------------------------------------------------
+// RecLog
+//-------------------------------------------------------------------------
+void
+RecLog(DiagsLevel dl, const char *format_string, ...)
+{
+  va_list ap;
+
+  va_start(ap, format_string);
+  if (g_diags) {
+    g_diags->log_va(NULL, dl, NULL, format_string, ap);
+  }
+  va_end(ap);
+}
+
+
+//-------------------------------------------------------------------------
+// RecDebug
+//-------------------------------------------------------------------------
+void
+RecDebug(DiagsLevel dl, const char *format_string, ...)
+{
+  va_list ap;
+
+  va_start(ap, format_string);
+  if (g_diags) {
+    g_diags->log_va("rec", dl, NULL, format_string, ap);
+  }
+  va_end(ap);
+}
+
+
+//-------------------------------------------------------------------------
+// RecDebugOff
+//-------------------------------------------------------------------------
+void
+RecDebugOff()
+{
+  g_diags = NULL;
+}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8bd2dc6f/lib/records/RecUtils.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecUtils.cc b/lib/records/RecUtils.cc
index 6fd3b08..8485984 100644
--- a/lib/records/RecUtils.cc
+++ b/lib/records/RecUtils.cc
@@ -425,44 +425,3 @@ RecDataSetFromString(RecDataT data_type, RecData * data_dst, const char *data_st
   return rec_set;
 }
 
-
-//-------------------------------------------------------------------------
-// RecLog
-//-------------------------------------------------------------------------
-void
-RecLog(DiagsLevel dl, const char *format_string, ...)
-{
-  va_list ap;
-
-  va_start(ap, format_string);
-  if (g_diags) {
-    g_diags->log_va(NULL, dl, NULL, format_string, ap);
-  }
-  va_end(ap);
-}
-
-
-//-------------------------------------------------------------------------
-// RecDebug
-//-------------------------------------------------------------------------
-void
-RecDebug(DiagsLevel dl, const char *format_string, ...)
-{
-  va_list ap;
-
-  va_start(ap, format_string);
-  if (g_diags) {
-    g_diags->log_va("rec", dl, NULL, format_string, ap);
-  }
-  va_end(ap);
-}
-
-
-//-------------------------------------------------------------------------
-// RecDebugOff
-//-------------------------------------------------------------------------
-void
-RecDebugOff()
-{
-  g_diags = NULL;
-}