Last active
August 18, 2023 03:15
-
-
Save katowulf/0475fb7a5907ed757f687aab6ed15878 to your computer and use it in GitHub Desktop.
Enable debug logging in Firestore in Java, Javascript, or Swift.
This file contains 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
/******* Android **********/ | |
// See https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/FirebaseFirestore.html#setLoggingEnabled(boolean) | |
FirebaseFirestore.setLoggingEnabled(true); | |
/******* Server-side Java **********/ | |
/** | |
See https://medium.com/@hiranya911/logging-in-java-libraries-for-firebase-and-google-cloud-platform-f8742493b73f | |
1) Add the slf4j-simple binding to the application classpath | |
2) Set the -Dorg.slf4j.simpleLogger.defaultLogLevel=debug system property | |
**/ |
This file contains 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
// https://firebase.google.com/docs/reference/js/firebase.firestore#setloglevel | |
firebase.firestore.setLogLevel('debug'); |
This file contains 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
// https://firebase.google.com/docs/reference/swift/firebasefirestore/api/reference/Classes/Firestore#enablelogging_ | |
Firestore.enableLogging(true) |
This file contains 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
# For use in Google App Engine and GCP environments | |
# See https://medium.com/@hiranya911/logging-in-java-libraries-for-firebase-and-google-cloud-platform-f8742493b73f | |
.level=INFO | |
com.google.firebase.level=FINE | |
java.util.logging.SimpleFormatter.format='%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %2$s %5$s%6$s%n' |
👍
The JavaScript link is now https://firebase.google.com/docs/reference/js/firebase.firestore#setloglevel
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
swift version should be