aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/helpers/memenv/memenv.cc
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-12-12 02:17:17 +0100
committerGavin Andresen <gavinandresen@gmail.com>2013-01-23 10:41:44 -0500
commit4786302fb99f930afca1e778255b72c6999ca480 (patch)
tree8c92a473f0c8772d152561d909fedce4b8ed5d2f /src/leveldb/helpers/memenv/memenv.cc
parentc429f2b062140843f42b78d70278279c6be74441 (diff)
Replace leveldb/ with vanilla 1.7.0
Diffstat (limited to 'src/leveldb/helpers/memenv/memenv.cc')
-rw-r--r--src/leveldb/helpers/memenv/memenv.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leveldb/helpers/memenv/memenv.cc b/src/leveldb/helpers/memenv/memenv.cc
index 2082083b3f..5879de1214 100644
--- a/src/leveldb/helpers/memenv/memenv.cc
+++ b/src/leveldb/helpers/memenv/memenv.cc
@@ -221,6 +221,11 @@ class WritableFileImpl : public WritableFile {
FileState* file_;
};
+class NoOpLogger : public Logger {
+ public:
+ virtual void Logv(const char* format, va_list ap) { }
+};
+
class InMemoryEnv : public EnvWrapper {
public:
explicit InMemoryEnv(Env* base_env) : EnvWrapper(base_env) { }
@@ -358,6 +363,11 @@ class InMemoryEnv : public EnvWrapper {
return Status::OK();
}
+ virtual Status NewLogger(const std::string& fname, Logger** result) {
+ *result = new NoOpLogger;
+ return Status::OK();
+ }
+
private:
// Map from filenames to FileState objects, representing a simple file system.
typedef std::map<std::string, FileState*> FileSystem;