3

I open the db using OpenForReadOnly and I want it really just do readonly. But It actually create a lot of log files. How to disable it.

::rocksdb::DB* result;
::rocksdb::Options options;
options.create_if_missing = false;
options.keep_log_file_num = 1;
options.info_log_level = ::rocksdb::InfoLogLevel::FATAL_LEVEL;
options.recycle_log_file_num = 1;
::rocksdb::DB::OpenForReadOnly(options, path, &result);

This is what I tried to disable the log. And it's not working

J. Doe
  • 632
  • 1
  • 4
  • 11
  • I think you should also set `stats_dump_period_sec` to 0. If you can't get rid of it you could always set `db_log_dir` to a directory which you just discard afterwards. If you need more help, including the log entires you still get would be helpful. Of course you can also implement your own logger, which just drops everything. – midor May 29 '18 at 09:23

0 Answers0