Add per-target log level configuration via settings.toml#30
Merged
Conversation
- New `[log_levels.game]` and `[log_levels.app]` sections in settings.toml allow per-target log level overrides for the game mod and Daystrom backend - Default log level changed from Trace/Debug to Info for both mod and backend, reducing log noise for end users - Log values in PlayerPrefs hooks truncated to 80 characters with ellipsis, using floor_char_boundary for safe UTF-8 handling - Mod logger: OnceLock-based target level map, checked in enabled() before any formatting. Global max level dynamically raised when any target override exceeds Info - Backend logger: per-target overrides fed into fern's level_for() builder at startup - Shared parse_level_filter() in both crates, case-insensitive (Info/INFO/info all work) - Added docs/log-levels.md with all available targets for both game and app scopes - Tests for parse_level_filter, TOML deserialization, and truncate_value including multibyte UTF-8 edge case
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.
[log_levels.game]and[log_levels.app]sections in settings.toml allow per-target log level overrides for the game mod and Daystrom backend