feat: add debug logging and verbose CLI flag#8
Merged
Conversation
Also, fix recusive dir mapping.
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.
This pull request introduces verbose logging throughout the codebase to aid debugging and traceability of operations. It adds support for a
--verboseCLI flag, integrates thelogandenv_loggercrates, and insertsdebug!log statements in key functions across thecommands,git, andinstallermodules. The changes also remove sectioned comments to streamline the code.Logging and debug support:
logandenv_loggerdependencies inCargo.tomlto enable logging throughout the project.debug!log statements in critical functions insrc/commands.rs,src/git.rs, andsrc/installer.rsto trace command execution, source resolution, file operations, and git interactions. [1] [2] [3]CLI improvements:
--verboseglobal flag to the CLI, allowing users to enable verbose logging for debugging purposes.Codebase cleanup:
src/commands.rsto streamline the code and improve readability. [1] [2] [3] [4] [5]Logging enhancements in git operations:
debug!statements to log git clone, fetch, checkout, and reset operations, including cache hits/misses and default branch detection. [1] [2] [3] [4] [5] [6]These changes collectively improve observability and make troubleshooting much easier during development and usage.