From 63fc8e14be5e450df8ccc18fe76e02c5f0827660 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 7 Jan 2023 14:07:13 +0100 Subject: Test statistics --- config.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'config.cpp') 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("webserver.threads"); + m_statistics_path = tree.get("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& 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; -- cgit v1.2.3