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
Logging inconsistent between object/array for $destroy #588
Comments
Noticed this too. And i think an edge case here maybe.
Firebase looks like:
If there is just one member and he leaves the room, roomMembers should become null as expected. I remove members using where i just set the member id to null: $scope.removeMember(memberFirebaseGeneratedId) Right after that i want currentMembers to sync with a set of new room members, so i destroy the currentMembers: $scope.currentMembers.$destroy() if $scope.currentMembers And this is when my console blows:
|
My preference would be to have debug log added to |
I'd actually vote to remove the @krokhale - It sounds like you found a separate issue. Can you please open a new issue and provide a full repro of the issue. You can fork my AngularFire Plunker Seed so you don't have to set up a lot of the boilerplate for the repro. Please use a demo Firebase (see the URL I included in the |
@jwngr it will be much easier to deactivate these in Angular (which is a one-liner) than to $extend/decorate in order to add them for development. I'm in favor of keeping them. |
Also, this works as-is in the latest release. I couldn't repro this error. Both $firebaseObject and $firebaseArray log errors for permission denied. |
The main thing I don't like about this is that Also @katowulf, where does the This bug wasn't about permission denied errors (which are out of our control since the Firebase library itself logs them), it was about extraneous logging when |
Only one other place, in the $$error method: https://github.com/firebase/angularfire/blob/86ea97e8e5a5cbf1691f422b64467e654976686b/src/FirebaseArray.js#L394 |
Whether or not we have a debug statement in the destroy method is not worth much argument. It could stay or go. The $destroy logging is of interest since destroy can get called in different ways and may not be immediately intuitive; it could be helpful for figuring out why things mysteriously quit synchronizing (hopefully we'd get an error as well, so again minor). However, logging of errors in $$error is a bit more important. All of the common errors are authentication and security related, and all will require some output in order to troubleshoot. So I feel like on by default, and even on in production, are very appropriate for these. I don't imagine there's too much disagreement about error logging, and since it can be turned off easily, should be kept. |
I'm totally on board keeping |
I say ☃. |
Fixes #588 - remove debug log from FirebaseArray::$destroy()
Yay! Agreement 😀 |
(feedback quoted from a user)
I just updated to AngularFire 1.0.0. I've added $destroy events to a
$firebaseArray and a $firebaseObject. I noticed that the $destroy on a
$firebaseArray does a debug log (destroy called for FirebaseArray: .....).
However no such log occurs for the $firebaseObject.
This has me wondering:
The text was updated successfully, but these errors were encountered: