Skip to content

Commit c853113

Browse files
Jawnnypoorogerhu
authored andcommitted
Log some things
1 parent 812285a commit c853113

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

fcm/src/main/java/com/parse/ParseFCMParseAccess.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313
*/
1414
public class ParseFCMParseAccess {
1515

16+
private static final String TAG = "ParseFCM";
17+
18+
public static void logVerbose(String message) {
19+
PLog.v(TAG, message);
20+
}
21+
22+
public static void logError(String message, Throwable tr) {
23+
PLog.e(TAG, message, tr);
24+
}
25+
1626
public static void setToken(ParseInstallation installation, String token) {
1727
installation.setDeviceToken(token);
1828
//Yes, we are actually FCM, but its the same for our purposes

fcm/src/main/java/com/parse/fcm/ParseFirebaseJobService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class ParseFirebaseJobService extends JobService {
2323

2424
@Override
2525
public boolean onStartJob(final JobParameters job) {
26+
ParseFCMParseAccess.logVerbose("Updating FCM token");
2627
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
2728
String token = FirebaseInstanceId.getInstance().getToken();
2829
if (installation != null && token != null) {
@@ -33,6 +34,7 @@ public void done(ParseException e) {
3334
if (e == null) {
3435
jobFinished(job, false);
3536
} else {
37+
ParseFCMParseAccess.logError("FCM token upload failed", e);
3638
jobFinished(job, true);
3739
}
3840
}

0 commit comments

Comments
 (0)