feat: Implement config manager with layered resolution and startup banner - #11
Merged
Conversation
Configuration values now track system defaults, file overrides, and CLI overrides separately. The effective value is resolved with the correct precedence (CLI > file > default), and both reads and resolved-config dumps use that layered value instead of the raw stored entry.
The app now opens ./config.toml and feeds it into ConfigManager before parsing command-line arguments. ConfigManager's TOML loader was updated to accept an input stream instead of a string, allowing file-based configuration loading without copying the entire file into memory.
Remove an unnecessary comment in ConfigManager.cpp that described applying lowest-priority configuration layers. This change has no functional impact — it simply cleans up the source by deleting an outdated/comment-only line.
Adds a brief startup banner in apps/main.cpp before configuration loading, including application metadata, licensing details, and a warranty notice to identify the server and its open-source terms.
This commit updates the startup banner in the main application entry point to reflect the project's XMPP server branding. It changes the displayed title from "XTRPG C++ Server" to "XTRPG: A XMPP Server" while keeping the rest of the version and licensing metadata unchanged.
Add a blank line after the software banner and improve generated CLI help output by including an explicit Options section and a --help/-h entry. This makes the command-line interface easier to read and more user-friendly.
Replace occurrences of '\n' with std::endl in src/config/ConfigManager.cpp::dumpResolvedConfig so section headers, option descriptions, key/value lines, and blank lines are written with std::endl (ensures consistent line termination and flush behavior).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.