You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2008/11/20 23:10:30 UTC
svn commit: r719397 - in /webservices/axis/trunk/c: include/axis/Axis.h
include/axis/Axis.hpp src/cbindings/AxisC.cpp src/engine/Axis.cpp
Author: nadiramra
Date: Thu Nov 20 14:10:30 2008
New Revision: 719397
URL: http://svn.apache.org/viewvc?rev=719397&view=rev
Log:
AXISCPP-100 enable axis c++ (engine) tracing - add trace type to API prototypes.
Modified:
webservices/axis/trunk/c/include/axis/Axis.h
webservices/axis/trunk/c/include/axis/Axis.hpp
webservices/axis/trunk/c/src/cbindings/AxisC.cpp
webservices/axis/trunk/c/src/engine/Axis.cpp
Modified: webservices/axis/trunk/c/include/axis/Axis.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/Axis.h?rev=719397&r1=719396&r2=719397&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/Axis.h (original)
+++ webservices/axis/trunk/c/include/axis/Axis.h Thu Nov 20 14:10:30 2008
@@ -42,6 +42,22 @@
* @file Axis.h
*/
+ /**
+ * @enum AXISC_TRACE_TYPE
+ * Trace types
+ */
+ typedef enum
+ {
+ AXISC_TRACE_TYPE_ENTRY=0,
+
+ AXISC_TRACE_TYPE_EXIT=1,
+
+ AXISC_TRACE_TYPE_EXCEPTION=2,
+
+ AXISC_TRACE_TYPE_DEBUG=3
+
+ } AXISC_TRACE_TYPE;
+
/**
*
* Contains methods to initialize and terminate the Axis runtime. Creating a stub also initializes
@@ -191,7 +207,7 @@
* @param ... - variable nuumber of parameters.
*/
AXISC_STORAGE_CLASS_INFO
-void axiscAxisWriteTrace(const char* functionName, const char * fmt, ...);
+void axiscAxisWriteTrace(AXISC_TRACE_TYPE type, const char* functionName, const char * fmt, ...);
#ifdef __cplusplus
}
Modified: webservices/axis/trunk/c/include/axis/Axis.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/Axis.hpp?rev=719397&r1=719396&r2=719397&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/Axis.hpp (original)
+++ webservices/axis/trunk/c/include/axis/Axis.hpp Thu Nov 20 14:10:30 2008
@@ -57,6 +57,22 @@
class STORAGE_CLASS_INFO Axis
{
public:
+ /**
+ * @enum AXIS_TRACE_TYPE
+ * Trace types
+ */
+ typedef enum
+ {
+ AXIS_TRACE_TYPE_ENTRY=0,
+
+ AXIS_TRACE_TYPE_EXIT=1,
+
+ AXIS_TRACE_TYPE_EXCEPTION=2,
+
+ AXIS_TRACE_TYPE_DEBUG=3
+
+ } AXIS_TRACE_TYPE;
+
/**
* Initializes the Axis runtime.
* @param bIsServer should be set to false for client applications.
@@ -122,11 +138,12 @@
/**
* Log trace.
*
+ * @param type - trace type
* @param functionName - class method or function for which trace record is being written.
* @param fmt - format as defined in printf and related functions.
* @param ... - variable nuumber of parameters.
*/
- static void writeTrace(const char* functionName, const char * fmt, ...);
+ static void writeTrace(AXIS_TRACE_TYPE type, const char* functionName, const char * fmt, ...);
};
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/cbindings/AxisC.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/AxisC.cpp?rev=719397&r1=719396&r2=719397&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/AxisC.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/AxisC.cpp Thu Nov 20 14:10:30 2008
@@ -504,7 +504,7 @@
}
AXISC_STORAGE_CLASS_INFO
-void axiscAxisWriteTrace(const char* functionName, const char * fmt, ...)
+void axiscAxisWriteTrace(AXISC_TRACE_TYPE type, const char* functionName, const char * fmt, ...)
{
// If logging is not enabled, just return.
if (!AxisTrace::isLoggingEnabled() || !AxisTrace::isStubLoggingEnabled())
@@ -513,10 +513,19 @@
// Construct final formatter
std::string myfmt;
std::string blank = " ";
+
+ char *traceType = TRACE_TYPE_DEBUG;
+ if (type == AXISC_TRACE_TYPE_ENTRY)
+ traceType = TRACE_TYPE_ENTRY;
+ else if (type == AXISC_TRACE_TYPE_EXIT)
+ traceType = TRACE_TYPE_EXIT;
+ else if (type == AXISC_TRACE_TYPE_EXCEPTION)
+ traceType = TRACE_TYPE_EXCEPT;
+
if (NULL == fmt)
fmt = "";
myfmt += TRACE_COMPONENT_STUB + blank;
- myfmt += TRACE_TYPE_DEBUG + blank;
+ myfmt += traceType + blank;
myfmt += functionName;
myfmt += "(): ";
myfmt += fmt;
Modified: webservices/axis/trunk/c/src/engine/Axis.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/engine/Axis.cpp?rev=719397&r1=719396&r2=719397&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/engine/Axis.cpp (original)
+++ webservices/axis/trunk/c/src/engine/Axis.cpp Thu Nov 20 14:10:30 2008
@@ -802,7 +802,7 @@
}
void Axis::
-writeTrace(const char* functionName, const char * fmt, ...)
+writeTrace(AXIS_TRACE_TYPE type, const char* functionName, const char * fmt, ...)
{
// If logging is not enabled, just return.
if (!AxisTrace::isLoggingEnabled() || !AxisTrace::isStubLoggingEnabled())
@@ -811,10 +811,19 @@
// Construct final formatter
string myfmt;
string blank = " ";
+
+ char *traceType = TRACE_TYPE_DEBUG;
+ if (type == AXIS_TRACE_TYPE_ENTRY)
+ traceType = TRACE_TYPE_ENTRY;
+ else if (type == AXIS_TRACE_TYPE_EXIT)
+ traceType = TRACE_TYPE_EXIT;
+ else if (type == AXIS_TRACE_TYPE_EXCEPTION)
+ traceType = TRACE_TYPE_EXCEPT;
+
if (NULL == fmt)
fmt = "";
myfmt += TRACE_COMPONENT_STUB + blank;
- myfmt += TRACE_TYPE_DEBUG + blank;
+ myfmt += traceType + blank;
myfmt += functionName;
myfmt += "(): ";
myfmt += fmt;