hgomez 01/03/27 14:02:36
Modified: src/native/mod_jk/apache2.0 mod_jk.c
Log:
Add support for timestamp in mod_jk.log
New var is JkLogStampFormat and use strftime
format ie : "[%a %b %d %H:%M:%S %Y] "
nota the " " to make it a single param
Also since Apache 2.0 alpha 15, ap_get_remote_host
need another param
Revision Changes Path
1.10 +14 -4 jakarta-tomcat/src/native/mod_jk/apache2.0/mod_jk.c
Index: mod_jk.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache2.0/mod_jk.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mod_jk.c 2001/03/13 23:34:33 1.9
+++ mod_jk.c 2001/03/27 22:02:34 1.10
@@ -327,7 +327,7 @@
s->protocol = r->protocol;
s->remote_host = (char *)ap_get_remote_host(r->connection,
- r->per_dir_config,
+ r->per_dir_config, REMOTE_NAME,
REMOTE_HOST);
s->remote_host = NULL_FOR_EMPTY(s->remote_host);
@@ -448,7 +448,7 @@
return NULL;
}
-static const char *jk_set_wroker_file(cmd_parms *cmd,
+static const char *jk_set_worker_file(cmd_parms *cmd,
void *dummy,
char *worker_file)
{
@@ -487,9 +487,17 @@
return NULL;
}
+static const char * jk_set_log_fmt(cmd_parms *cmd,
+ void *dummy,
+ char * log_format)
+{
+ jk_set_log_format(log_format);
+ return NULL;
+}
+
static const command_rec jk_cmds[] =
{
- {"JkWorkersFile", jk_set_wroker_file, NULL, RSRC_CONF, TAKE1,
+ {"JkWorkersFile", jk_set_worker_file, NULL, RSRC_CONF, TAKE1,
"the name of a worker file for the Jakarta servlet containers"},
{"JkMount", jk_mount_context, NULL, RSRC_CONF, TAKE23,
"A mount point from a context to a Tomcat worker"},
@@ -499,6 +507,8 @@
"Full path to the Jakarta Tomcat module log file"},
{"JkLogLevel", jk_set_log_level, NULL, RSRC_CONF, TAKE1,
"The Jakarta Tomcat module log level, can be debug, info, error or emerg"},
+ {"JkLogStampFormat", jk_set_log_fmt, NULL, RSRC_CONF, TAKE1,
+ "The Jakarta Tomcat module log format, follow strftime synthax"},
{NULL}
};
@@ -725,7 +735,7 @@
if(map_alloc(&init_map)) {
if(map_read_properties(init_map, conf->worker_file)) {
- ap_add_version_component(pconf,
"mod_jk");
+ ap_add_version_component(pconf, "mod_jk");
if(wc_open(init_map, conf->log)) {
return;
}