-
-
Notifications
You must be signed in to change notification settings - Fork 169
Feature/debug function #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
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
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: Copilot <[email protected]>
dr-dimitru
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Implements #906 by allowing
debugto be abooleanorfunctiontype....argsas in the original logging