costin 2002/10/30 14:12:20 Modified: jk/native/common jk_ajp_common.c jk_connect.c Log: More trimming for error messages. Now only one line ( and hopefully more informative ) is displayed if we can't send the request to tomcat. Revision Changes Path 1.32 +11 -5 jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c Index: jk_ajp_common.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- jk_ajp_common.c 30 Oct 2002 21:17:34 -0000 1.31 +++ jk_ajp_common.c 30 Oct 2002 22:12:20 -0000 1.32 @@ -623,7 +623,9 @@ } } - jk_log(l, JK_LOG_ERROR, "ERROR connecting to tomcat. Tomcat is probably not started. Failed errno = %d\n", errno); + jk_log(l, JK_LOG_INFO, + "Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = %d\n", + errno); return JK_FALSE; } @@ -869,7 +871,7 @@ return JK_FALSE; } } else { - jk_log(l, JK_LOG_ERROR, "Error connecting to the Tomcat process.\n"); + jk_log(l, JK_LOG_INFO, "Error connecting to the Tomcat process.\n"); return JK_FALSE; } } @@ -1175,15 +1177,19 @@ return JK_FALSE; } - jk_log(l, JK_LOG_ERROR, "ERRORO: Receiving from tomcat failed, recoverable operation. err=%d\n", i); + jk_log(l, JK_LOG_ERROR, "ERROR: Receiving from tomcat failed, recoverable operation. err=%d\n", i); } else - jk_log(l, JK_LOG_ERROR, "ERROR: sending request to tomcat failed in send loop. err=%d\n", i); + jk_log(l, JK_LOG_INFO, "sending request to tomcat failed in send loop. err=%d\n", i); jk_close_socket(p->sd); p->sd = -1; ajp_reuse_connection(p, l); } + + /* Log the error only once per failed request. */ + jk_log(l, JK_LOG_ERROR, "Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = %d\n", errno); + } else { jk_log(l, JK_LOG_ERROR, "In jk_endpoint_t::service, NULL parameters\n"); } 1.6 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_connect.c Index: jk_connect.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- jk_connect.c 4 Sep 2002 11:31:33 -0000 1.5 +++ jk_connect.c 30 Oct 2002 22:12:20 -0000 1.6 @@ -174,7 +174,7 @@ jk_log(l, JK_LOG_DEBUG, "jk_open_socket, return, sd = %d\n", sock); return sock; } - jk_log(l, JK_LOG_ERROR, "jk_open_socket, connect() failed errno = %d\n", errno); + jk_log(l, JK_LOG_INFO, "jk_open_socket, connect() failed errno = %d\n", errno); jk_close_socket(sock); } else { #ifdef WIN32
-- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>