Conversation
v3.0.0 is finally out! Fully refactored version of Meteor files, now with tests, async support, latest Meteor, release support, and with many improved and fixed features. See v3.0.0 release notes and v3 migration document for more details. Special thanks to: @bratelefant @harryadel @jankapunkt @StorytellerCZ @make-github-pseudonymous-again
Collaborator
Author
|
@dr-dimitru I think there should be one or two additional tests to make sure this is not breaking. What do you think? |
There was a problem hiding this comment.
Pull request overview
This PR implements feature request #906 by extending the debug configuration parameter to accept either a boolean or a function type. When a function is provided, all debug logging is routed to that custom function instead of the console, allowing developers to integrate with their own logging systems.
Key Changes
- Modified
_debug()method incore.jsto check if debug is a function and use it accordingly - Updated validation logic in
server.jsandclient.jsto accept both boolean and function types - Updated JSDoc comments and documentation to reflect the new function parameter option
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| core.js | Modified _debug() method to conditionally use custom debug function when provided, falling back to console logging when debug === true |
| server.js | Updated validation to accept function type for debug parameter and updated JSDoc documentation |
| client.js | Updated validation to accept function type for debug parameter and updated JSDoc documentation |
| docs/constructor.md | Updated documentation table to reflect that debug accepts Boolean or Function type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@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.
Implements #906 by allowing
debugto be abooleanorfunctiontype....argsas in the original logging