summaryrefslogtreecommitdiffstats
path: root/utility
diff options
context:
space:
mode:
Diffstat (limited to 'utility')
-rw-r--r--utility/database.c2
-rw-r--r--utility/logparse.c3
-rw-r--r--utility/mod_log_sql.conf1
3 files changed, 4 insertions, 2 deletions
diff --git a/utility/database.c b/utility/database.c
index e7650aa..a979268 100644
--- a/utility/database.c
+++ b/utility/database.c
@@ -19,7 +19,7 @@ apr_status_t database_connect(config_t *cfg)
19{ 19{
20 apr_status_t rv; 20 apr_status_t rv;
21 if (!cfg->dbconn) { 21 if (!cfg->dbconn) {
22 cfg->dbconn = apr_palloc(cfg->pool, sizeof(config_dbd_t)); 22 cfg->dbconn = apr_pcalloc(cfg->pool, sizeof(config_dbd_t));
23 } 23 }
24 rv = apr_dbd_get_driver(cfg->pool, cfg->dbdriver, &(cfg->dbconn->driver)); 24 rv = apr_dbd_get_driver(cfg->pool, cfg->dbdriver, &(cfg->dbconn->driver));
25 if (rv) 25 if (rv)
diff --git a/utility/logparse.c b/utility/logparse.c
index e9ca340..dfe2e9b 100644
--- a/utility/logparse.c
+++ b/utility/logparse.c
@@ -40,6 +40,8 @@ static apr_status_t parser_func_regexmatch(apr_pool_t *p, config_t *cfg,
40 40
41 if (!ap_regexec(data->rx, value, AP_MAX_REG_MATCH, regm, 0)) { 41 if (!ap_regexec(data->rx, value, AP_MAX_REG_MATCH, regm, 0)) {
42 *ret = ap_pregsub(p, data->substr, value, AP_MAX_REG_MATCH, regm); 42 *ret = ap_pregsub(p, data->substr, value, AP_MAX_REG_MATCH, regm);
43 } else {
44 *ret = field->def;
43 } 45 }
44 //printf("We matched %s against %s to %s\n",value, field->args[0], *ret); 46 //printf("We matched %s against %s to %s\n",value, field->args[0], *ret);
45 return APR_SUCCESS; 47 return APR_SUCCESS;
@@ -51,6 +53,7 @@ static apr_status_t parser_func_totimestamp(apr_pool_t *p, config_t *cfg,
51 time_t time; 53 time_t time;
52 struct tm ts; 54 struct tm ts;
53 55
56 //memset(&ts,0,sizeof(struct tm));
54 57
55 strptime(value, "%d/%b/%Y:%H:%M:%S %z", &ts); 58 strptime(value, "%d/%b/%Y:%H:%M:%S %z", &ts);
56 time = mktime(&ts); 59 time = mktime(&ts);
diff --git a/utility/mod_log_sql.conf b/utility/mod_log_sql.conf
index 9730983..bd8496c 100644
--- a/utility/mod_log_sql.conf
+++ b/utility/mod_log_sql.conf
@@ -2,7 +2,6 @@ InputDirectory ./logs
2ErrorLog ./error_log 2ErrorLog ./error_log
3DBDDriver mysql 3DBDDriver mysql
4DBDParams "host=localhost;user=root;dbname=apache_log" 4DBDParams "host=localhost;user=root;dbname=apache_log"
5DBParam socketfile /tmp/mysql.sock
6Table access_log 5Table access_log
7MachineID 7of9 6MachineID 7of9
8UseTransactions on 7UseTransactions on
>2004-01-20 | | | | | | | mod_log_sql.h Registered core item functions in pre_config * moved extract_* functions to functions.h (version specific in ↵Gravatar Edward Rudd 2004-01-20 | | | | | | | | | functions(13|20).h) moves SSL logging routings to mod_log_sql_ssl.c updated changelog added AUTHORS * split out version specific codeGravatar Edward Rudd 2004-01-20 | | | | | | | code compiles under apache 1.3 and 2.0 updated apache m4 script to detect both verions (two minumums) defaulted install to not activate module in configuration file (use make activate) * fixed SSL cflag inclusion1.92Gravatar Edward Rudd 2004-01-06 | * update m4 filesGravatar Edward Rudd 2004-01-06 | | | | | release 1.92 * update apache.m4 to use -with-apxs instead of --with-apacheGravatar Edward Rudd 2004-01-04 | | | | | | got SSL support to compile. added Documentation subdirectory. * uses Date::Parse instead of ParseDateGravatar Edward Rudd 2003-12-30 | | | | | | uses Getopt::Long instead of Getopt:Std Added in filling in of request_time fields instead of just timestamp. * added mysql import script by Aaron Jenson.Gravatar Edward Rudd 2003-12-30 | * removed -n parameter to apxs as it isn\'t needed for this moduleGravatar Edward Rudd 2003-12-30 | * mysql_error returns const char * in mysql 4.x, updated variable defs in ↵Gravatar Edward Rudd 2003-12-30 | | | | safe_sql_query to avoid warning. * update autoconf scripts to check MySQL..1.91Gravatar Edward Rudd 2003-12-23 | | | | | | | | | moved autoconf DEFUN macros to m4 subdirectory autogen.sh calls aclocal to include m4 directory. merged in changes from 1.19b1 fixed log_sql_merge_config bug in 1.19b1 release 1.91 * compiles and loads under apache2.0Gravatar Edward Rudd 2003-12-22 | | | | | | consolidated configuration functions uses APR_OFFSETOF.. delayed inserts are configurable * *** empty log message ***Gravatar Edward Rudd 2003-12-22 | * CVS headers addedGravatar Edward Rudd 2003-12-21 | * .cvsignore addedGravatar Edward Rudd 2003-12-20 | * install.sh (autoconf)Gravatar Edward Rudd 2003-12-20 | * added aclocal.m4 (rest of autoconf stuff)Gravatar Edward Rudd 2003-12-20 | * added autoconfig filesGravatar Edward Rudd 2003-12-20 | * Initial revision