diff options
Diffstat (limited to 'bench/wtperf/misc.c')
-rw-r--r-- | bench/wtperf/misc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bench/wtperf/misc.c b/bench/wtperf/misc.c index 2821216f240..14a6610f5bc 100644 --- a/bench/wtperf/misc.c +++ b/bench/wtperf/misc.c @@ -32,18 +32,20 @@ int setup_log_file(CONFIG *cfg) { + CONFIG_OPTS *opts; int ret; char *fname; + opts = cfg->opts; ret = 0; - if (cfg->verbose < 1) + if (opts->verbose < 1) return (0); fname = dcalloc(strlen(cfg->monitor_dir) + - strlen(cfg->table_name) + strlen(".stat") + 2, 1); + strlen(opts->table_name) + strlen(".stat") + 2, 1); - sprintf(fname, "%s/%s.stat", cfg->monitor_dir, cfg->table_name); + sprintf(fname, "%s/%s.stat", cfg->monitor_dir, opts->table_name); cfg->logf = fopen(fname, "w"); if (cfg->logf == NULL) { ret = errno; @@ -64,15 +66,18 @@ setup_log_file(CONFIG *cfg) void lprintf(const CONFIG *cfg, int err, uint32_t level, const char *fmt, ...) { + CONFIG_OPTS *opts; va_list ap; - if (err == 0 && level <= cfg->verbose) { + opts = cfg->opts; + + if (err == 0 && level <= opts->verbose) { va_start(ap, fmt); vfprintf(cfg->logf, fmt, ap); va_end(ap); fprintf(cfg->logf, "\n"); - if (level < cfg->verbose) { + if (level < opts->verbose) { va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); |