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/31 05:07:49 UTC
svn commit: r373693 - in /webservices/axis2/trunk/c: include/axis2_log.h
modules/core/transport/http/receiver/http_server.c
modules/core/transport/http/server/http_server_main.c modules/util/log.c
Author: samisa
Date: Mon Jan 30 20:07:38 2006
New Revision: 373693
URL: http://svn.apache.org/viewcvs?rev=373693&view=rev
Log:
Added more log related fixes
Modified:
webservices/axis2/trunk/c/include/axis2_log.h
webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_server.c
webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
webservices/axis2/trunk/c/modules/util/log.c
Modified: webservices/axis2/trunk/c/include/axis2_log.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_log.h?rev=373693&r1=373692&r2=373693&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_log.h (original)
+++ webservices/axis2/trunk/c/include/axis2_log.h Mon Jan 30 20:07:38 2006
@@ -99,7 +99,7 @@
axis2_status_t (AXIS2_CALL *log_critical) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
axis2_status_t (AXIS2_CALL *log_error) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
axis2_status_t (AXIS2_CALL *log_warning) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
- axis2_status_t (AXIS2_CALL *log_info) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
+ axis2_status_t (AXIS2_CALL *log_info) (struct axis2_log *log, axis2_char_t *format, ...);
axis2_status_t (AXIS2_CALL *log_debug) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
} axis2_log_ops_t;
@@ -127,7 +127,7 @@
axis2_status_t AXIS2_CALL axis2_log_impl_log_warning(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
-axis2_status_t AXIS2_CALL axis2_log_impl_log_info(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
+axis2_status_t AXIS2_CALL axis2_log_impl_log_info(axis2_log_t *log, const axis2_char_t *format,...);
axis2_status_t AXIS2_CALL axis2_log_impl_log_debug(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_server.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_server.c?rev=373693&r1=373692&r2=373693&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_server.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_server.c Mon Jan 30 20:07:38 2006
@@ -185,8 +185,7 @@
AXIS2_HTTP_SVR_THREAD_FREE(server_impl->svr_thread, env);
return AXIS2_FAILURE;
}
- AXIS2_LOG_WRITE((*env)->log, "[Axis2]Starting HTTP server thread",
- AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, "Starting HTTP server thread");
AXIS2_HTTP_SVR_THREAD_SET_WORKER(server_impl->svr_thread, env, worker);
AXIS2_HTTP_SVR_THREAD_RUN(server_impl->svr_thread, env);
return AXIS2_SUCCESS;
@@ -198,15 +197,14 @@
{
AXIS2_FUNC_PARAM_CHECK(server, env, AXIS2_FAILURE);
- AXIS2_LOG_WRITE((*env)->log, "[Axis2]Terminating HTTP server thread",
- AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, "Terminating HTTP server thread");
if(NULL != AXIS2_INTF_TO_IMPL(server)->svr_thread)
{
AXIS2_HTTP_SVR_THREAD_DESTROY(AXIS2_INTF_TO_IMPL(server)->svr_thread,
env);
}
- AXIS2_LOG_WRITE((*env)->log, "[Axis2]Successfully terminated HTTP server\
- thread", AXIS2_LOG_LEVEL_INFO);
+ AXIS2_LOG_INFO((*env)->log, "Successfully terminated HTTP server\
+ thread");
return AXIS2_SUCCESS;
}
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=373693&r1=373692&r2=373693&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 20:07:38 2006
@@ -109,10 +109,10 @@
axis2_error_init();
- 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);
+ AXIS2_LOG_INFO(env->log, "Starting Axis2 HTTP server....");
+ AXIS2_LOG_INFO(env->log, "Server port : %d", port);
+ AXIS2_LOG_INFO(env->log, "Repo location : %s", repo_path);
+ AXIS2_LOG_INFO(env->log, "Read Timeout : %d ms", axis2_http_socket_read_timeout);
server = axis2_http_server_create(&env, repo_path, port);
if(NULL == server)
Modified: webservices/axis2/trunk/c/modules/util/log.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/log.c?rev=373693&r1=373692&r2=373693&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/log.c (original)
+++ webservices/axis2/trunk/c/modules/util/log.c Mon Jan 30 20:07:38 2006
@@ -132,7 +132,10 @@
level_str = "[debug] ";
break;
}
- fprintf(fd,"%s %s(%d) %s\n", level_str,file,line,value);
+ if (file)
+ fprintf(fd,"%s %s(%d) %s\n", level_str, file, line, value);
+ else
+ fprintf(fd,"%s %s\n", level_str, value);
return 0;
}
@@ -155,7 +158,7 @@
}
axis2_status_t AXIS2_CALL
-axis2_log_impl_log_info(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...)
+axis2_log_impl_log_info(axis2_log_t *log, const axis2_char_t *format,...)
{
if (!log || !format)
return -1;
@@ -167,7 +170,7 @@
va_start(ap, format);
vsnprintf(value, AXIS2_LEN_VALUE, format, ap);
va_end(ap);
- axis2_log_impl_write_to_file(stderr,AXIS2_LOG_LEVEL_INFO,filename,linenumber,value);
+ axis2_log_impl_write_to_file(stderr, AXIS2_LOG_LEVEL_INFO, NULL, -1, value);
}
return 0;
}