Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Don't create access log file unless access logging is enabled.

Kishore Nallan4967e48769d5
diff --git a/include/app_metrics.h b/include/app_metrics.h
index cc285d09..8606dab4 100644
--- a/include/app_metrics.h
+++ b/include/app_metrics.h
@@ -31,7 +31,7 @@ private:
durations = new spp::sparse_hash_map<std::string, uint64_t>();
access_log_path = Config::get_instance().get_access_log_path();
- if(!access_log_path.empty()) {
+ if(Config::get_instance().get_enable_access_logging() && !access_log_path.empty()) {
access_log.open(access_log_path, std::ofstream::out | std::ofstream::app);
}
}