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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user