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 sa...@apache.org on 2006/01/30 16:01:26 UTC
svn commit: r373520 - in /webservices/axis2/trunk/c: include/
modules/core/deployment/ modules/core/engine/
modules/core/transport/http/server/ test/client/echo/
Author: samisa
Date: Mon Jan 30 07:01:04 2006
New Revision: 373520
URL: http://svn.apache.org/viewcvs?rev=373520&view=rev
Log:
Fixed logging mechanism in source files in line with new logging API.
Modified:
webservices/axis2/trunk/c/include/axis2_addr.h
webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
webservices/axis2/trunk/c/modules/core/engine/addr_disp.c
webservices/axis2/trunk/c/modules/core/engine/disp_checker.c
webservices/axis2/trunk/c/modules/core/engine/engine.c
webservices/axis2/trunk/c/modules/core/engine/phase.c
webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c
webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c
webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c
webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
webservices/axis2/trunk/c/test/client/echo/echo_client.c
Modified: webservices/axis2/trunk/c/include/axis2_addr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_addr.h?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_addr.h (original)
+++ webservices/axis2/trunk/c/include/axis2_addr.h Mon Jan 30 07:01:04 2006
@@ -67,7 +67,7 @@
/* =======================================================================*/
- #define WS_ADDRESSING_VERSION "WSAddressingVersion"
+ #define AXIS2_WSA_VERSION "WSAddressingVersion"
#define AXIS2_WSA_DEFAULT_PREFIX "wsa"
#define PARAM_SERVICE_GROUP_CONTEXT_ID "ServiceGroupContextIdFromAddressing"
Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Mon Jan 30 07:01:04 2006
@@ -410,9 +410,7 @@
AXIS2_SVC_BUILDER_FREE(svc_builder, env);
if(AXIS2_SUCCESS != status)
{
- axis2_char_t message[1024];
- sprintf(message, "%s:%d - populating service is not successful\n:", __FILE__, __LINE__);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "populating service is not successful");
return AXIS2_FAILURE;
}
Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c Mon Jan 30 07:01:04 2006
@@ -249,8 +249,6 @@
int i = 0;
int size = 0;
AXIS2_TIME_T timestamp = 0;
- axis2_char_t message[1024];
- axis2_char_t *log_msg = NULL;
AXIS2_FUNC_PARAM_CHECK(svc_builder, env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, svc_node, AXIS2_FAILURE);
@@ -352,9 +350,7 @@
svc_folder_path = AXIS2_FILE_GET_PATH(svc_folder, env);
temp_path = AXIS2_STRACAT(svc_folder_path, AXIS2_PATH_SEP_STR, env);
dll_path = AXIS2_STRACAT(temp_path, svc_dll_name, env);
- sprintf(message, "%s:%d - dll path is:", __FILE__, __LINE__);
- log_msg = AXIS2_STRACAT(message, dll_path, env);
- AXIS2_LOG(env, log_msg, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "dll path is : %s", dll_path);
status = AXIS2_DLL_DESC_SET_NAME(dll_desc, env, dll_path);
if(AXIS2_SUCCESS != status)
{
Modified: webservices/axis2/trunk/c/modules/core/engine/addr_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/addr_disp.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/addr_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/addr_disp.c Mon Jan 30 07:01:04 2006
@@ -98,9 +98,7 @@
if (address)
{
axis2_char_t **url_tokens = NULL;
- axis2_char_t message[1024];
- sprintf(message, "Checking for service using WSA enpoint address : %s", address);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for service using WSA enpoint address : %s", address);
if ( (AXIS2_STRCMP(AXIS2_WSA_ANONYMOUS_URL, address) == 0 ) ||
(AXIS2_STRCMP(AXIS2_WSA_NAMESPACE_SUBMISSION, address) == 0 ))
@@ -161,8 +159,7 @@
if (action)
{
axis2_char_t message[1024];
- sprintf(message, "Checking for Operation using WSAAction : %s", action);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for Operation using WSAAction : %s", action);
qname = axis2_qname_create(env, action, NULL, NULL);
return AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, qname);
Modified: webservices/axis2/trunk/c/modules/core/engine/disp_checker.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/disp_checker.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/disp_checker.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/disp_checker.c Mon Jan 30 07:01:04 2006
@@ -238,31 +238,14 @@
svc = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env);
if (!svc)
{
- AXIS2_LOG(env, "Service Not found. Endpoint reference is ", AXIS2_LOG_LEVEL_INFO);
- if (endpoint_ref)
- {
- AXIS2_LOG(env, AXIS2_ENDPOINT_REF_GET_ADDRESS(endpoint_ref, env), AXIS2_LOG_LEVEL_INFO);
- }
- else
- AXIS2_LOG(env, "NULL ", AXIS2_LOG_LEVEL_INFO);
-
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Service Not found. Endpoint reference is : %s", (endpoint_ref)?endpoint_ref:"NULL");
return AXIS2_FAILURE;
}
op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
if (!op)
{
- AXIS2_LOG(env, "Operation Not found. Endpoint reference is ", AXIS2_LOG_LEVEL_INFO);
- if (endpoint_ref)
- {
- AXIS2_LOG(env, AXIS2_ENDPOINT_REF_GET_ADDRESS(endpoint_ref, env), AXIS2_LOG_LEVEL_INFO);
- }
- else
- AXIS2_LOG(env, "NULL ", AXIS2_LOG_LEVEL_INFO);
-
- AXIS2_LOG(env, " and WSA Action = ", AXIS2_LOG_LEVEL_INFO);
- AXIS2_LOG(env, AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env), AXIS2_LOG_LEVEL_INFO);
-
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Operation Not found. Endpoint reference is : %s", (endpoint_ref)?endpoint_ref:"NULL");
return AXIS2_FAILURE;
}
return AXIS2_SUCCESS;
Modified: webservices/axis2/trunk/c/modules/core/engine/engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/engine.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/engine.c Mon Jan 30 07:01:04 2006
@@ -100,7 +100,7 @@
engine_impl->engine.ops->get_receiver_fault_code = axis2_engine_get_receiver_fault_code;
engine_impl->engine.ops->free = axis2_engine_free;
- AXIS2_LOG(env, "Axis2 Engine Started", AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Axis2 Engine Started");
return &(engine_impl->engine);
}
@@ -221,9 +221,7 @@
}
else
{
- axis2_char_t message[1024];
- sprintf(message, "%s:%d - Transport out is not set in message context", __FILE__, __LINE__);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_DEBUG);
+ AXIS2_LOG_DEBUG((*env)->log, LOG_SI, "Transport out is not set in message context");
return AXIS2_FAILURE;
}
}
@@ -318,9 +316,7 @@
receiver = AXIS2_OP_GET_MSG_RECEIVER(op, env);
if (!receiver)
{
- axis2_char_t message[1024];
- sprintf(message, "%s:%d - Message receiver not set in operation description", __FILE__, __LINE__);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_DEBUG);
+ AXIS2_LOG_DEBUG((*env)->log, LOG_SI, "Message receiver not set in operation description");
return AXIS2_FAILURE;
}
AXIS2_MSG_RECV_RECEIVE(receiver, env, msg_ctx);
Modified: webservices/axis2/trunk/c/modules/core/engine/phase.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/phase.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/phase.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/phase.c Mon Jan 30 07:01:04 2006
@@ -157,18 +157,15 @@
axis2_handler_t *handler)
{
axis2_phase_impl_t *phase_impl = NULL;
- char message[1024];
AXIS2_FUNC_PARAM_CHECK(phase, env, AXIS2_FAILURE);
phase_impl = AXIS2_INTF_TO_IMPL(phase);
- sprintf(message, "axis2_handler_t *%s added to the index %d of the phase %s",
- AXIS2_QNAME_GET_LOCALPART(AXIS2_HANDLER_GET_NAME(handler, env), env),
- index,
- phase_impl->name);
-
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "axis2_handler_t *%s added to the index %d of the phase %s",
+ AXIS2_QNAME_GET_LOCALPART(AXIS2_HANDLER_GET_NAME(handler, env), env),
+ index,
+ phase_impl->name);
return AXIS2_ARRAY_LIST_ADD_AT(phase_impl->handlers, env, index, handler);
}
@@ -178,18 +175,15 @@
axis2_handler_t *handler)
{
axis2_phase_impl_t *phase_impl = NULL;
- char message[1024];
AXIS2_FUNC_PARAM_CHECK(phase, env, AXIS2_FAILURE);
phase_impl = AXIS2_INTF_TO_IMPL(phase);
- sprintf(message, "Handler %s added to phase %s",
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Handler %s added to phase %s",
AXIS2_QNAME_GET_LOCALPART(AXIS2_HANDLER_GET_NAME(handler, env), env),
phase_impl->name);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
-
return AXIS2_ARRAY_LIST_ADD(phase_impl->handlers, env, handler);
}
@@ -217,10 +211,9 @@
}
else
{
- sprintf(message, "Invoke the first handler %s within the phase %s",
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Invoke the first handler %s within the phase %s",
AXIS2_QNAME_GET_LOCALPART(AXIS2_HANDLER_GET_NAME(phase_impl->first_handler, env), env),
phase_impl->name);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
status = AXIS2_HANDLER_INVOKE(phase_impl->first_handler, env, msg_ctx);
if (status != AXIS2_SUCCESS)
return status;
@@ -240,10 +233,9 @@
axis2_handler_t *handler = (axis2_handler_t*) AXIS2_ARRAY_LIST_GET(phase_impl->handlers, env, index);
if (handler)
{
- sprintf(message, "Invoke the handler %s within the phase %s",
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Invoke the handler %s within the phase %s",
AXIS2_QNAME_GET_LOCALPART(AXIS2_HANDLER_GET_NAME(handler, env), env),
phase_impl->name);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
status = AXIS2_HANDLER_INVOKE(handler, env, msg_ctx);
if (status != AXIS2_SUCCESS)
return status;
@@ -263,10 +255,9 @@
}
else
{
- sprintf(message, "Invoke the last handler %s within the phase %s",
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Invoke the last handler %s within the phase %s",
AXIS2_QNAME_GET_LOCALPART(AXIS2_HANDLER_GET_NAME(phase_impl->last_handler, env), env),
phase_impl->name);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
status = AXIS2_HANDLER_INVOKE(phase_impl->last_handler, env, msg_ctx);
if (status != AXIS2_SUCCESS)
return status;
Modified: webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c Mon Jan 30 07:01:04 2006
@@ -98,9 +98,7 @@
if (address)
{
axis2_char_t **url_tokens = NULL;
- axis2_char_t message[1024];
- sprintf(message, "Checking for service using target endpoint address : %s", address);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for service using target endpoint address : %s", address);
url_tokens = axis2_parse_request_url_for_svc_and_op(env, address);
@@ -165,9 +163,7 @@
{
axis2_qname_t *op_qname = NULL;
axis2_op_t *op = NULL;
- axis2_char_t message[1024];
- sprintf(message, "Checking for operation using target endpoint uri fragment : %s", url_tokens[1]);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for operation using target endpoint uri fragment : %s", url_tokens[1]);
op_qname = axis2_qname_create(env, url_tokens[1], NULL, NULL);
op = AXIS2_SVC_GET_OP_WITH_NAME(svc, env, AXIS2_QNAME_GET_LOCALPART(op_qname, env));
AXIS2_QNAME_FREE(op_qname, env);
Modified: webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c Mon Jan 30 07:01:04 2006
@@ -86,7 +86,7 @@
{
AXIS2_FUNC_PARAM_CHECK(msg_ctx, env, NULL);
- AXIS2_LOG(env, "Checking for Service using SOAPAction is a TODO item", AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for Service using SOAPAction is a TODO item");
return NULL;
}
@@ -112,9 +112,7 @@
if (action)
{
axis2_op_t *op = NULL;
- axis2_char_t message[1024];
- sprintf(message, "Checking for operation using SOAP action : %s", action);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for operation using SOAP action : %s", action);
op = AXIS2_SVC_GET_OP_BY_SOAP_ACTION(svc, env, action);
if (!op)
Modified: webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c Mon Jan 30 07:01:04 2006
@@ -113,9 +113,7 @@
if (uri)
{
axis2_char_t **url_tokens = NULL;
- axis2_char_t message[1024];
- sprintf(message, "Checking for service using SOAP message body's first child's namespace URI : %s", uri);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for service using SOAP message body's first child's namespace URI : %s", uri);
url_tokens = axis2_parse_request_url_for_svc_and_op(env, uri);
@@ -191,9 +189,7 @@
{
axis2_qname_t *op_qname = NULL;
axis2_op_t *op = NULL;
- axis2_char_t message[1024];
- sprintf(message, "Checking for operation using SOAP message body's first child's local name : %s", element_name);
- AXIS2_LOG(env, message, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, LOG_SI, "Checking for operation using SOAP message body's first child's local name : %s", element_name);
op_qname = axis2_qname_create(env, element_name, NULL, NULL);
op = AXIS2_SVC_GET_OP_WITH_NAME(svc, env, AXIS2_QNAME_GET_LOCALPART(op_qname, env));
AXIS2_QNAME_FREE(op_qname, env);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c Mon Jan 30 07:01:04 2006
@@ -101,28 +101,17 @@
axis2_error_init();
- printf("[Axis2]Starting Axis2 HTTP server....\n");
- AXIS2_LOG_WRITE(env->log, "[Axis2]Starting Axis2 HTTP server....\n",
- AXIS2_LOG_LEVEL_INFO);
- sprintf(tmp_str, "[Axis2]Server port : %d", port);
- printf("%s\n",tmp_str);
- AXIS2_LOG_WRITE(env->log, tmp_str, AXIS2_LOG_LEVEL_INFO);
- sprintf(tmp_str, "[Axis2]Repo location : %s", repo_path);
- printf("%s\n",tmp_str);
- AXIS2_LOG_WRITE(env->log, tmp_str, AXIS2_LOG_LEVEL_INFO);
- sprintf(tmp_str, "[Axis2]Read Timeout : %d ms",
- axis2_http_socket_read_timeout);
- printf("%s\n",tmp_str);
- AXIS2_LOG_WRITE(env->log, tmp_str, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO(env->log, LOG_SI, "Starting Axis2 HTTP server....");
+ AXIS2_LOG_INFO(env->log, LOG_SI, "Server port : %d", port);
+ AXIS2_LOG_INFO(env->log, LOG_SI, "Repo location : %s", repo_path);
+ AXIS2_LOG_INFO(env->log, LOG_SI, "Read Timeout : %d ms", axis2_http_socket_read_timeout);
server = axis2_http_server_create(&env, repo_path, port);
if(NULL == server)
{
- sprintf(tmp_str, "[Axis2]Server creation failed: Error code: %d",
- env->error->error_number);
- printf("%s\n",tmp_str);
- printf("%s \n", AXIS2_ERROR_GET_MESSAGE(env->error));
- AXIS2_LOG_WRITE(env->log, tmp_str, AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_ERROR(env->log, LOG_SI, "Server creation failed: Error code: %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
system_exit(allocator, env, -1);
}
Modified: webservices/axis2/trunk/c/test/client/echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/echo_client.c?rev=373520&r1=373519&r2=373520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/test/client/echo/echo_client.c Mon Jan 30 07:01:04 2006
@@ -41,7 +41,7 @@
error = axis2_error_create(allocator);
log = axis2_log_create(allocator, NULL);
env = axis2_env_create_with_error_log(allocator, error, log);
- env->log->level = AXIS2_LOG_INFO;
+ env->log->level = AXIS2_LOG_LEVEL_INFO;
envelope = build_soap_programatically(&env);
node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(envelope, &env);
@@ -115,3 +115,4 @@
return soap_envelope;
}
+