Configuration and logging move out of the context source

context.cpp had grown to hold three unrelated concerns: the context
lifecycle, everything about the .conf file format, and everything about
writing a log message.

conf.cpp now owns the format end to end - parsing a file into the store,
reading values back out, and interpreting a configured string as the
boolean or log level a setting holds. logging.cpp owns the write path:
the level filter, the stream choice, and the name a level carries in
output.

context.cpp keeps what a context is: resolving each setting from the
override, the configured value, or the built-in default, and reporting
what it resolved.
This commit is contained in:
2026-08-18 02:57:47 -04:00
parent 50b95fb729
commit c71913ded9
7 changed files with 429 additions and 283 deletions

View File

@@ -90,14 +90,4 @@ namespace dpm_core {
* @param msg The failure description
*/
void set_error(dpm_ctx* ctx, const std::string& msg);
/**
* @brief Loads all configuration files into the context
*
* Parses every .conf file in the context's configuration directory
* into the context's configuration store.
*
* @param ctx The libdpm-core.so context
*/
void load_config_dir(dpm_ctx* ctx);
} // namespace dpm_core