Fix Excessive Logging Issue with :ObsidianToday Command #526
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.
Summary
This pull request addresses an issue introduced in commit
f2eeb0a
where the:ObsidianToday
command in the obsidian.nvim plugin began logging excessive information upon execution. This behavior is a result of enhanced error logging and a debug print statement that was not intended for production use.Changes Made
vim.print(new_note)
debug statement which was responsible for logging complete note objects into the Neovim command line.Testing
The changes have been tested locally to ensure that the
:ObsidianToday
command operates as expected without producing unnecessary log output. The command's functionality remains intact, and only relevant error messages are displayed to the user in case of an actual error.Impact
This fix should enhance the user experience by preventing the unintended flood of debug information to the command line, thereby keeping the logs clean and relevant to the user's actions.
Resolves: Excessive logging when running
:ObsidianToday
with a template defined.Please review the changes and consider merging this pull request to improve the plugin's functionality.
Thank you for your consideration.
Fixes #525
Best regards,
jmartinn