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
main
Dhruba Borthakur 11 years ago
parent a4913c5170
commit c5de1b9391
  1. 3
      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 {

Loading…
Cancel
Save