diff options
Diffstat (limited to 'src/leveldb/helpers/memenv/memenv.cc')
-rw-r--r-- | src/leveldb/helpers/memenv/memenv.cc | 10 |
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; |