diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-07 14:07:13 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-07 14:07:13 +0100 |
commit | 63fc8e14be5e450df8ccc18fe76e02c5f0827660 (patch) | |
tree | d1e37837b277b75e0eb9289b41a47f5dc86b4360 /config.cpp | |
parent | 7feaf1a9d7fb09985b9b17cd48fd1aa8eb15d8b3 (diff) |
Test statistics
Diffstat (limited to 'config.cpp')
-rw-r--r-- | config.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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; |