KDSPDSetup
Small library to initialize spdlog loggers from a toml configuration file.
Loading...
Searching...
No Matches
KDSPDSetup Namespace Reference

The only public-facing namespace in the library. More...

Namespaces

namespace  details
 This namespace contains implementation details and helpers used by functions in KDSPDSetup::setup. This includes lookup for sink types and spdlog enums, maps to contain named sinks, patterns, and thread pools (to be used when constructing loggers), and functions that actually construct sink pointers of specific types.
 
namespace  setup
 This namespace contains the functions directly called by KDSPDSetup::setupFrom, along with helpers called by those functions. The file which contains the definitions for members of KDSPDSetup::setup, setup.h, is included in the implementation file kdspdsetup.cpp The functions defined in this namespace make use of the members of namespace KDSPDSetup::details, defined in details.h.
 

Functions

void setupFrom (std::string const &file)
 This function performs all setup needed to start logging. It should be the only callable part of the library.
 

Detailed Description

The only public-facing namespace in the library.

Function Documentation

◆ setupFrom()

void KDSPDSetup::setupFrom ( std::string const &  file)

This function performs all setup needed to start logging. It should be the only callable part of the library.

Parameters
fileThe toml configuration file to read from.

Definition at line 16 of file kdspdsetup.cpp.

17{
18 auto const data = toml::parse(file);
19
20 setup::setupSinks(data);
21 setup::setupPatterns(data);
22 setup::setupThreadPools(data);
23 setup::setupLoggers(data);
24}
Here is the call graph for this function: