diff --git a/conf/minifi-log.properties b/conf/minifi-log.properties index aeb4e8bc85..04b32e5ede 100644 --- a/conf/minifi-log.properties +++ b/conf/minifi-log.properties @@ -28,8 +28,8 @@ spdlog.pattern=[%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v appender.rolling=rollingappender #appender.rolling.directory=${MINIFI_HOME}/logs appender.rolling.file_name=minifi-app.log -appender.rolling.max_files=3 -appender.rolling.max_file_size=5 MB +appender.rolling.max_files=1 +appender.rolling.max_file_size=20 MB #Other possible appenders #appender.stdout=stdout diff --git a/extensions/rocksdb-repos/database/RocksDbUtils.cpp b/extensions/rocksdb-repos/database/RocksDbUtils.cpp index 223cbb27ea..2237767fc1 100644 --- a/extensions/rocksdb-repos/database/RocksDbUtils.cpp +++ b/extensions/rocksdb-repos/database/RocksDbUtils.cpp @@ -20,6 +20,7 @@ #include #include "Exception.h" +#include "utils/Literals.h" namespace org::apache::nifi::minifi::internal { @@ -56,7 +57,8 @@ void setCommonRocksDbOptions(Writable& db_opts) { db_opts.set(&rocksdb::DBOptions::create_if_missing, true); db_opts.set(&rocksdb::DBOptions::use_direct_io_for_flush_and_compaction, true); db_opts.set(&rocksdb::DBOptions::use_direct_reads, true); - db_opts.set(&rocksdb::DBOptions::keep_log_file_num, 5); + db_opts.set(&rocksdb::DBOptions::keep_log_file_num, 1); + db_opts.set(&rocksdb::DBOptions::max_log_file_size, 1_MiB); } std::unordered_map getRocksDbOptionsToOverride(const std::shared_ptr &configuration, std::string_view custom_db_prefix) {