That sounds good. It wasn't obvious to me that a failed connection would
still get logged at the ERROR level.
Thanks for cleaning up these error messages.
Glenn
Costin Manolache wrote:
Glenn Nielsen wrote:
Costin,
Why were the log levels changed from LOG_ERROR to LOG_INFO, a connection
failure to tomct is a real fatal error when handling a request. Shouldn't
it be at the JK_LOG_ERROR level?
It'll be logged at ERROR level -
+ 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); +
( instead of the "Can't find servlet handler" :-)
I just limited the number of messages that are logged at ERROR level
for each failed connection, you should see a single error message.
If you want more verbosity - you'll get it as info.
Costin
Regards,
Glenn
[EMAIL PROTECTED] wrote:
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:[EMAIL PROTECTED]> For additional
commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
----------------------------------------------------------------------
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder |
MOREnet System Programming | * if iz ina coment. |
Missouri Research and Education Network | */ |
----------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>