From c5de1b9391d163c26720704f7f20064b6f684f1b Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Mon, 10 Jun 2013 08:13:23 -0700 Subject: [PATCH] Print name of user comparator in LOG. Summary: The current code prints the name of the InternalKeyComparator in the log file. We would also like to print the name of the user-specified comparator for easier debugging. Test Plan: make check Reviewers: sheki Reviewed By: sheki CC: leveldb Differential Revision: https://reviews.facebook.net/D11181 --- db/dbformat.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/dbformat.cc b/db/dbformat.cc index 7b7336abc..be48909a9 100644 --- a/db/dbformat.cc +++ b/db/dbformat.cc @@ -44,7 +44,8 @@ std::string InternalKey::DebugString(bool hex) const { } const char* InternalKeyComparator::Name() const { - return "leveldb.InternalKeyComparator"; + return ("leveldb.InternalKeyComparator:" + + std::string(user_comparator_->Name())).c_str(); } int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const {