Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(tidesdb_cpp VERSION 2.1.0 LANGUAGES CXX)
project(tidesdb_cpp VERSION 2.1.1 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
2 changes: 2 additions & 0 deletions include/tidesdb/tidesdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ struct Config
LogLevel logLevel = LogLevel::Info;
std::size_t blockCacheSize = 64 * 1024 * 1024;
std::size_t maxOpenSSTables = 256;
bool logToFile = false;
std::size_t logTruncationAt = 24 * 1024 * 1024;
};

/**
Expand Down
4 changes: 4 additions & 0 deletions src/tidesdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ TidesDB::TidesDB(const Config& config)
cConfig.log_level = static_cast<tidesdb_log_level_t>(config.logLevel);
cConfig.block_cache_size = config.blockCacheSize;
cConfig.max_open_sstables = config.maxOpenSSTables;
cConfig.log_to_file = config.logToFile ? 1 : 0;
cConfig.log_truncation_at = config.logTruncationAt;

int result = tidesdb_open(&cConfig, &db_);
checkResult(result, "failed to open database");
Expand Down Expand Up @@ -729,6 +731,8 @@ Config TidesDB::defaultConfig()
config.logLevel = static_cast<LogLevel>(cConfig.log_level);
config.blockCacheSize = cConfig.block_cache_size;
config.maxOpenSSTables = cConfig.max_open_sstables;
config.logToFile = cConfig.log_to_file != 0;
config.logTruncationAt = cConfig.log_truncation_at;

return config;
}
Expand Down
Loading