github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/database/leveldb/include/port/win_logger.h (about) 1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. See the AUTHORS file for names of contributors. 4 5 // Logger implementation for Windows 6 7 #ifndef STORAGE_LEVELDB_UTIL_WIN_LOGGER_H_ 8 #define STORAGE_LEVELDB_UTIL_WIN_LOGGER_H_ 9 10 #include <stdio.h> 11 #include "leveldb/env.h" 12 13 namespace leveldb { 14 15 class WinLogger : public Logger { 16 private: 17 FILE* file_; 18 public: 19 explicit WinLogger(FILE* f) : file_(f) { assert(file_); } 20 virtual ~WinLogger() { 21 fclose(file_); 22 } 23 virtual void Logv(const char* format, va_list ap); 24 25 }; 26 27 } 28 #endif // STORAGE_LEVELDB_UTIL_WIN_LOGGER_H_