summaryrefslogtreecommitdiffhomepage
path: root/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'config.cpp')
-rw-r--r--config.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/config.cpp b/config.cpp
index 342d973..2b37f91 100644
--- a/config.cpp
+++ b/config.cpp
@@ -45,6 +45,8 @@ void Config::readConfigfile(const std::filesystem::path& filename)
m_threads = tree.get<int>("webserver.threads");
+ m_statistics_path = tree.get<std::string>("webserver.statisticspath", "/var/lib/webserver/stats.db");
+
// optional entries
auto elements = tree.get_child_optional("webserver");
if (elements) {
@@ -226,6 +228,11 @@ int Config::Threads() const
return m_threads;
}
+fs::path Config::statistics_path() const
+{
+ return m_statistics_path;
+}
+
const std::vector<std::string>& Config::PluginDirectories() const
{
return m_plugin_directories;
@@ -245,10 +252,12 @@ void Config::dump() const
{
std::cout << "=== Configuration ===========================" << std::endl;
std::cout << "User: " << m_user << std::endl;
- std::cout << "Group: " << m_user << std::endl;
+ std::cout << "Group: " << m_group << std::endl;
std::cout << "Threads: " << m_threads << std::endl;
+ std::cout << "Statistics Path: " << statistics_path() << std::endl;
+
std::cout << "Plugin Directories:";
for (const auto& dir: m_plugin_directories)
std::cout << " " << dir;