mturk 2004/11/11 01:45:23
Modified: jk/native/common jk_lb_worker.c jk_msg_buff.c jk_msg_buff.h
jk_uri_worker_map.c jk_worker.c
Log:
Clean up log messages.
Revision Changes Path
1.28 +4 -4 jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c
Index: jk_lb_worker.c
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- jk_lb_worker.c 10 Nov 2004 16:36:48 -0000 1.27
+++ jk_lb_worker.c 11 Nov 2004 09:45:23 -0000 1.28
@@ -290,7 +290,7 @@
jk_b_reset(s->reco_buf);
s->reco_status = RECO_INITED;
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ "::service sticky_session=%d\n",
+ "service sticky_session=%d\n",
p->worker->sticky_session);
while (1) {
@@ -306,7 +306,7 @@
rc = rec->w->get_endpoint(rec->w, &end, l);
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ "::service worker=%s jvm_route=%s
rc=%d\n",
+ "service worker=%s jvm_route=%s rc=%d\n",
rec->name, s->jvm_route, rc);
if (rc && end) {
@@ -345,7 +345,7 @@
* another worker... Lets try to do that.
*/
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ "::recoverable error... will try to
recover on other host\n");
+ "recoverable error... will try to recover on other
host\n");
}
else {
/* NULL record, no more workers left ... */
1.20 +5 -4 jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c
Index: jk_msg_buff.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- jk_msg_buff.c 10 Nov 2004 16:28:31 -0000 1.19
+++ jk_msg_buff.c 11 Nov 2004 09:45:23 -0000 1.20
@@ -385,13 +385,14 @@
*/
void jk_dump_buff(jk_logger_t *l,
const char *file,
- int line, int level, char *what, jk_msg_buf_t *msg)
+ int line, const char *funcname,
+ int level, char *what, jk_msg_buf_t *msg)
{
#ifdef USE_ALSO_BODY
- jk_log(l, file, line, level, "%s #%d %.*s\n",
+ jk_log(l, file, line, funcname, level, "%s #%d %.*s\n",
what, jk_b_get_len(msg), jk_b_get_len(msg), jk_b_get_buff(msg));
#else
- jk_log(l, file, line, level, "%s #%d\n", what, jk_b_get_len(msg));
+ jk_log(l, file, line, funcname, level, "%s #%d\n", what,
jk_b_get_len(msg));
#endif
}
1.13 +3 -2 jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.h
Index: jk_msg_buff.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- jk_msg_buff.h 8 Nov 2004 13:32:21 -0000 1.12
+++ jk_msg_buff.h 11 Nov 2004 09:45:23 -0000 1.13
@@ -157,7 +157,8 @@
/* --------------------- Help ------------------------ */
void jk_dump_buff(jk_logger_t *l,
const char *file,
- int line, int level, char *what, jk_msg_buf_t *msg);
+ int line, const char *funcname,
+ int level, char *what, jk_msg_buf_t *msg);
/** Copy a msg buf into another one
*/
1.27 +22 -40
jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c
Index: jk_uri_worker_map.c
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- jk_uri_worker_map.c 10 Nov 2004 16:36:48 -0000 1.26
+++ jk_uri_worker_map.c 11 Nov 2004 09:45:23 -0000 1.27
@@ -142,8 +142,7 @@
init_data, l);
}
- jk_log(l, JK_LOG_ERROR,
- __FUNCTION__ "::uri_worker_map_alloc, NULL parameters\n");
+ JK_LOG_NULL_PARAMS(l);
return JK_FALSE;
}
@@ -160,8 +159,7 @@
return JK_TRUE;
}
else
- jk_log(l, JK_LOG_ERROR,
- __FUNCTION__ "::uri_worker_map_free, NULL parameters\n");
+ JK_LOG_NULL_PARAMS(l);
return JK_FALSE;
}
@@ -215,7 +213,7 @@
if (!uwr) {
jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_add, can't alloc map
entry\n");
+ "can't alloc map entry\n");
return JK_FALSE;
}
@@ -224,7 +222,7 @@
if (!uri || !worker) {
jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_add, can't alloc
uri/worker strings\n");
+ "can't alloc uri/worker strings\n");
return JK_FALSE;
}
@@ -236,7 +234,7 @@
if (!uwr->uri) {
jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_add, can't alloc
uri string\n");
+ "can't alloc uri string\n");
return JK_FALSE;
}
@@ -256,7 +254,6 @@
uwr->suffix = asterisk + 2;
uwr->match_type = MATCH_TYPE_CONTEXT_PATH;
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, "
"general context path rule %s*%s=%s was added\n",
uri, asterisk + 2, worker);
}
@@ -268,7 +265,6 @@
uwr->suffix = asterisk + 3;
uwr->match_type = MATCH_TYPE_SUFFIX;
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, "
"suffix rule %s.%s=%s was added\n",
uri, asterisk + 3, worker);
}
@@ -280,7 +276,6 @@
uwr->suffix = asterisk + 2;
uwr->match_type = MATCH_TYPE_GENERAL_SUFFIX;
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, "
"general suffix rule %s*%s=%s was added\n",
uri, asterisk + 2, worker);
}
@@ -292,7 +287,6 @@
uwr->suffix = NULL;
uwr->match_type = MATCH_TYPE_CONTEXT;
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, "
"match rule %s=%s was added\n", uri, worker);
}
}
@@ -304,7 +298,7 @@
uwr->suffix = NULL;
uwr->match_type = MATCH_TYPE_EXACT;
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, exact
rule %s=%s was added\n",
+ "exact rule %s=%s was added\n",
uri, worker);
}
@@ -317,7 +311,7 @@
uwr->suffix = NULL;
uwr->match_type = MATCH_TYPE_EXACT;
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, exact
rule %s=%s was added\n",
+ "exact rule %s=%s was added\n",
uri, worker);
}
uwr->ctxt_len = strlen(uwr->context);
@@ -330,7 +324,7 @@
* not arrive here when using Apache.
*/
jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_add, invalid context
%s\n",
+ "invalid context %s\n",
uri);
return JK_FALSE;
}
@@ -367,7 +361,7 @@
sz = jk_map_size(init_data);
jk_log(l, JK_LOG_DEBUG,
- "jk_uri_worker_map_t::uri_worker_map_open, rule map size is
%d\n",
+ "rule map size is %d\n",
sz);
if (sz > 0) {
@@ -383,19 +377,19 @@
if (i == sz) {
jk_log(l, JK_LOG_DEBUG,
- "Into jk_uri_worker_map_t::uri_worker_map_open, there
are %d rules\n",
+ "there are %d rules\n",
uw_map->size);
}
else {
jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_open, There was
a parsing error\n");
+ "Parsing error\n");
rc = JK_FALSE;
}
}
if (rc == JK_FALSE) {
jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_open, there was an
error, freing buf\n");
+ "there was an error, freing buf\n");
jk_close_pool(&uw_map->p);
jk_close_pool(&uw_map->tp);
}
@@ -428,9 +422,7 @@
return JK_TRUE;
}
- jk_log(l, JK_LOG_ERROR,
- "jk_uri_worker_map_t::uri_worker_map_close, NULL parameter\n");
-
+ JK_LOG_NULL_PARAMS(l);
return JK_FALSE;
}
@@ -487,9 +479,7 @@
if (0 == strncmp(uwr->context, uri, uwr->ctxt_len)) {
if (MATCH_TYPE_EXACT == uwr->match_type) {
if (strlen(uri) == uwr->ctxt_len) {
- jk_log(l,
- JK_LOG_DEBUG,
- "jk_uri_worker_map_t::map_uri_to_worker, "
+ jk_log(l, JK_LOG_DEBUG,
"Found an exact match %s -> %s\n",
uwr->worker_name, uwr->context);
return uwr->worker_name;
@@ -497,9 +487,7 @@
}
else if (MATCH_TYPE_CONTEXT == uwr->match_type) {
if (uwr->ctxt_len > longest_match) {
- jk_log(l,
- JK_LOG_DEBUG,
- "jk_uri_worker_map_t::map_uri_to_worker, "
+ jk_log(l, JK_LOG_DEBUG,
"Found a context match %s -> %s\n",
uwr->worker_name, uwr->context);
longest_match = uwr->ctxt_len;
@@ -511,9 +499,7 @@
if (suffix_start >= 0
&& 0 == strcmp(uri + suffix_start, uwr->suffix)) {
if (uwr->ctxt_len >= longest_match) {
- jk_log(l,
- JK_LOG_DEBUG,
- "jk_uri_worker_map_t::map_uri_to_worker, "
+ jk_log(l, JK_LOG_DEBUG,
"Found a general suffix match %s ->
*%s\n",
uwr->worker_name, uwr->suffix);
longest_match = uwr->ctxt_len;
@@ -529,9 +515,7 @@
strncmp(suffix_path, uwr->suffix,
strlen(uwr->suffix))) {
if (uwr->ctxt_len >= longest_match) {
- jk_log(l,
- JK_LOG_DEBUG,
-
"jk_uri_worker_map_t::map_uri_to_worker, "
+ jk_log(l, JK_LOG_DEBUG,
"Found a general context path match
%s -> *%s\n",
uwr->worker_name, uwr->suffix);
longest_match = uwr->ctxt_len;
@@ -557,9 +541,8 @@
if (0 == strcmp(suffix, uwr->suffix)) {
#endif
if (uwr->ctxt_len >= longest_match) {
- jk_log(l,
- JK_LOG_DEBUG,
-
"jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match %s -> *.%s\n",
+ jk_log(l, JK_LOG_DEBUG,
+ "Found a suffix match %s -> *.%s\n",
uwr->worker_name, uwr->suffix);
longest_match = uwr->ctxt_len;
best_match = i;
@@ -586,15 +569,14 @@
if (fraud >= 0) {
jk_log(l, JK_LOG_EMERG,
- "In jk_uri_worker_map_t::map_uri_to_worker, found a
security fraud in '%s'\n",
+ "Found a security fraud in '%s'\n",
uri);
return uw_map->maps[fraud]->worker_name;
}
}
}
else {
- jk_log(l, JK_LOG_ERROR,
- __FUNCTION__ "::map_uri_to_worker, wrong parameters\n");
+ jk_log(l, JK_LOG_ERROR, "wrong parameters\n");
}
JK_TRACE_EXIT(l);
1.22 +10 -10 jakarta-tomcat-connectors/jk/native/common/jk_worker.c
Index: jk_worker.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_worker.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- jk_worker.c 10 Nov 2004 16:36:48 -0000 1.21
+++ jk_worker.c 11 Nov 2004 09:45:23 -0000 1.22
@@ -103,34 +103,34 @@
*rc = NULL;
if (!fac) {
- jk_log(l, JK_LOG_ERROR, __FUNCTION__ " NULL factory for %s\n",
+ jk_log(l, JK_LOG_ERROR, "NULL factory for %s\n",
type);
return JK_FALSE;
}
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ " about to create instance %s of %s\n", name,
+ "about to create instance %s of %s\n", name,
type);
if (!fac(&w, name, l) || !w) {
jk_log(l, JK_LOG_ERROR,
- __FUNCTION__ " factory for %s failed for %s\n", type,
+ "factory for %s failed for %s\n", type,
name);
return JK_FALSE;
}
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ " about to validate and init %s\n", name);
+ "about to validate and init %s\n", name);
if (!w->validate(w, init_data, we, l)) {
w->destroy(&w, l);
jk_log(l, JK_LOG_ERROR,
- __FUNCTION__ " validate failed for %s\n", name);
+ "validate failed for %s\n", name);
return JK_FALSE;
}
if (!w->init(w, init_data, we, l)) {
w->destroy(&w, l);
- jk_log(l, JK_LOG_ERROR, __FUNCTION__ " init failed for %s\n",
+ jk_log(l, JK_LOG_ERROR, "init failed for %s\n",
name);
return JK_FALSE;
}
@@ -179,7 +179,7 @@
jk_worker_t *w = NULL;
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ " creating worker %s\n", worker_list[i]);
+ "creating worker %s\n", worker_list[i]);
if (wc_create_worker(worker_list[i], init_data, &w, we, l)) {
jk_worker_t *oldw = NULL;
@@ -189,7 +189,7 @@
}
jk_log(l, JK_LOG_DEBUG,
- __FUNCTION__ " removing old %s worker \n",
+ "removing old %s worker \n",
worker_list[i]);
if (oldw) {
oldw->destroy(&oldw, l);
@@ -197,7 +197,7 @@
}
else {
jk_log(l, JK_LOG_ERROR,
- __FUNCTION__ " failed to create worker%s\n",
+ "failed to create worker%s\n",
worker_list[i]);
return JK_FALSE;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]