Add DMOD_LOG_STEP macros to driver configuration#30
Merged
JohnAmadis merged 3 commits intomainfrom Mar 6, 2026
Merged
Conversation
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add usage of DMOD_LOG_STEP macros for driver configuration
Add DMOD_LOG_STEP macros to driver configuration
Mar 6, 2026
JohnAmadis
reviewed
Mar 6, 2026
| static driver_node_t* configure_driver(const char* driver_name, dmini_context_t config_ctx) | ||
| { | ||
| DMOD_LOG_VERBOSE("Configuring driver: %s\n", driver_name); | ||
| DMOD_LOG_STEP_BEGIN("Configuring driver: %s\n", driver_name); |
Contributor
There was a problem hiding this comment.
@copilot dodaj jeszcze użycie DMOD_LOG_STEP_PROGRESS - aby było można się domyśleć na czym ta konfiguracja sfailowała
Contributor
Author
There was a problem hiding this comment.
Done in 88fb544. Added DMOD_LOG_STEP_PROGRESS at each stage of configure_driver:
- 25% — Loading driver module
- 50% — Resolving driver interface (
dmdrvi_create) - 75% — Creating driver context
- 90% — Reading driver node path
If a crash occurs at any stage, the last printed progress line will pinpoint exactly where in the configuration sequence the failure happened.
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
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.
Driver configuration had no step-level visibility — when a driver crashed or failed to load, there was no clear indication of which configuration was in progress or at which stage it failed.
Changes
configure_driver: ReplacedDMOD_LOG_VERBOSEat entry withDMOD_LOG_STEP_BEGINto announce each driver configuration step. Each call toconfigure_driver(one per config file or per INI section with adriver_namekey) now produces a distinct BEGIN/STEP pair.DMOD_LOG_STEP_PROGRESSat each internal stage so the last printed line pinpoints exactly where a failure or crash occurred:dmdrvi_create)DMOD_LOG_STEP(1, ...)on every failurereturn NULLpath so the terminal shows[ FAIL ]+ driver name on any error.DMOD_LOG_INFOon the success path withDMOD_LOG_STEP(0, ...)to show[ OK ].Existing
DMOD_LOG_ERRORcalls are preserved alongsideDMOD_LOG_STEPfailures to retain detailed error context.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.