KDSPDSetup
Small library to initialize spdlog loggers from a toml configuration file.
kdspdsetup.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KDSpdSetup.
3 
4  SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 
6  SPDX-License-Identifier: MIT
7 
8  Contact KDAB at <info@kdab.com> for commercial licensing options.
9 */
10 #include "kdspdsetup.h"
11 
12 #include <KDSpdSetup/setup.h>
13 
14 namespace KDSPDSetup {
15 
16 void setupFrom(std::string const &file)
17 {
18  auto const data = toml::parse(file);
19 
20  setup::setupSinks(data);
23  setup::setupLoggers(data);
24 }
25 
26 } // namespace KDSPDSetup
void setupLoggers(toml::value const &data)
Using data read from a toml file, extract vector of tables representing every logger specified....
Definition: setup.cpp:243
void setupPatterns(toml::value const &data)
Using data read from a toml file, search for the key global_pattern. If it exists,...
Definition: setup.cpp:108
void setupSinks(toml::value const &data)
Using data read from a toml file, extract vector of tables representing every sink specified....
Definition: setup.cpp:99
void setupThreadPools(toml::value const &data)
Using data read from a toml file, search for a table global_thread_pool, and initialize it with the s...
Definition: setup.cpp:127
The only public-facing namespace in the library.
Definition: details.cpp:12
void setupFrom(std::string const &file)
This function performs all setup needed to start logging. It should be the only callable part of the ...
Definition: kdspdsetup.cpp:16