From f9f8794a67561c243823cac0a45d8906e90ee7bb Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Mon, 27 Oct 2008 02:10:15 +0000 Subject: Added summary page including line count, duration, and final status of file --- (limited to 'utility/shell.c') diff --git a/utility/shell.c b/utility/shell.c index 5f011a6..6f98055 100644 --- a/utility/shell.c +++ b/utility/shell.c @@ -55,6 +55,30 @@ void show_help(const char *prog, const apr_getopt_option_t *opts, FILE *output) } } +void print_summary(config_t *cfg) { + config_filestat_t *fstat; + int i,m; + + fstat = (config_filestat_t *)cfg->input_files->elts; + + printf("Execution Summary\n"); + for (i=0, m=cfg->input_files->nelts; iinput_files)) { - char **filelist; + config_filestat_t *filelist; int f, l; - filelist = (char **)cfg->input_files->elts; + filelist = (config_filestat_t *)cfg->input_files->elts; for (f=0, l=cfg->input_files->nelts; f < l; f++) { - rv = parse_logfile(cfg, filelist[f]); + rv = parser_parsefile(cfg, &filelist[f]); if (rv) { logging_log(cfg, LOGLEVEL_NOISE, "Error occured parsing log files. Aborting"); @@ -183,6 +207,9 @@ int main(int argc, const char *const argv[]) if (!cfg->dryrun) { database_disconnect(cfg); } - /** @todo summary goes here */ + + if (cfg->summary) { + print_summary(cfg); + } return 0; } -- cgit v0.9.2