reimple logwriter in leveldb