From 48533a5c2daa1e9f9d02d13718cf351b510862eb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 Feb 2009 14:48:40 -0800 Subject: [PATCH] logger: fixes --- src/common/LogType.h | 4 ++-- src/common/Logger.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/LogType.h b/src/common/LogType.h index 886c1777003..2abaf56bddd 100644 --- a/src/common/LogType.h +++ b/src/common/LogType.h @@ -31,7 +31,7 @@ class LogType { public: LogType(int first, int tail) : - first_key(first), num_keys(tail-first), + first_key(first), num_keys(tail-first - 1), key_name(num_keys), inc_keys(num_keys), avg_keys(num_keys) { for (int i=0; i= 0 && i < num_keys); assert(isnew || key_name[i]); return i; diff --git a/src/common/Logger.cc b/src/common/Logger.cc index 7c981c5a873..df7ac878193 100644 --- a/src/common/Logger.cc +++ b/src/common/Logger.cc @@ -165,9 +165,9 @@ void Logger::_flush() if (wrote_header_last > 10) { out << "#" << type->num_keys; for (int i=0; inum_keys; i++) { - out << "\t" << type->key_name[i]; + out << "\t" << (type->key_name[i] ? type->key_name[i] : "???"); if (type->avg_keys[i]) - out << "\t" << type->key_name[i] << "*\t" << type->key_name[i] << "~"; + out << "\t(n)\t(var)"; } out << std::endl; //out << "\t (" << type->keymap.size() << ")" << endl; wrote_header_last = 0;