Skip to content

Commit c9e97f9

Browse files
authored
Change level on important logs (#472)
1 parent 160d815 commit c9e97f9

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

AndroidSDKCore/src/main/java/com/leanplum/Leanplum.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ public void response(JSONObject response) {
751751
request.onError(new Request.ErrorCallback() {
752752
@Override
753753
public void error(Exception e) {
754-
Log.d("Failed to receive start response");
754+
Log.i("Failed to receive start response");
755755
handleStartResponse(null);
756756
}
757757
});
@@ -1685,7 +1685,7 @@ public static void trackPurchase(final String event, double value, String curren
16851685
Map<String, ?> params) {
16861686
try {
16871687
if (TextUtils.isEmpty(event)) {
1688-
Log.d("Failed to trackPurchase, event name is null");
1688+
Log.i("Failed to trackPurchase, event name is null");
16891689
}
16901690

16911691
final Map<String, String> requestArgs = new HashMap<>();
@@ -1746,7 +1746,7 @@ public static void trackGooglePlayPurchase(String item, long priceMicros, String
17461746
public static void trackGooglePlayPurchase(String eventName, String item, long priceMicros,
17471747
String currencyCode, String purchaseData, String dataSignature, Map<String, ?> params) {
17481748
if (TextUtils.isEmpty(eventName)) {
1749-
Log.d("Failed to trackGooglePlayPurchase, event name is null");
1749+
Log.i("Failed to trackGooglePlayPurchase, event name is null");
17501750
}
17511751

17521752
final Map<String, String> requestArgs = new HashMap<>();
@@ -2137,7 +2137,7 @@ public static void setIsTestModeEnabled(boolean isTestModeEnabled) {
21372137
*/
21382138
public static String pathForResource(String filename) {
21392139
if (TextUtils.isEmpty(filename)) {
2140-
Log.d("pathForResource - Empty filename parameter provided.");
2140+
Log.i("pathForResource - Empty filename parameter provided.");
21412141
return null;
21422142
}
21432143

AndroidSDKCore/src/main/java/com/leanplum/LeanplumInboxMessage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public String getImageFilePath() {
8282
return new File(path).getAbsolutePath();
8383
}
8484
if (!LeanplumInbox.getInstance().isInboxImagePrefetchingEnabled()) {
85-
Log.d("Inbox Message image path is null because you're calling disableImagePrefetching. " +
85+
Log.i("Inbox Message image path is null because you're calling disableImagePrefetching. " +
8686
"Consider using imageURL method or remove disableImagePrefetching.");
8787
}
8888
return null;
@@ -115,7 +115,7 @@ public JSONObject getData() {
115115
CollectionUtil.uncheckedCast(getContext().objectNamed(Constants.Keys.DATA));
116116
object = JsonConverter.mapToJsonObject(mapData);
117117
} catch (Throwable t) {
118-
Log.d("Unable to parse JSONObject for Data field of inbox message.");
118+
Log.i("Unable to parse JSONObject for Data field of inbox message.");
119119
}
120120
return object;
121121
}

AndroidSDKCore/src/main/java/com/leanplum/internal/ActionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public boolean onResponse(ActionContext actionContext) {
172172
.invoke(new Object(), context, messageId);
173173
boolean didCancel = existingEta > Clock.getInstance().currentTimeMillis();
174174
if (didCancel) {
175-
Log.d("Cancelled notification");
175+
Log.i("Cancelled notification");
176176
}
177177
return didCancel;
178178
} catch (Throwable throwable) {

AndroidSDKFcm/src/main/java/com/leanplum/LeanplumFirebaseServiceHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void onMessageReceived(RemoteMessage remoteMessage, Context context) {
7171
notification.putString(Keys.CHANNEL_INTERNAL_KEY, channel);
7272
LeanplumPushService.handleNotification(context, notification);
7373
}
74-
Log.d("Received push notification message: %s", messageMap.toString());
74+
Log.i("Received push notification message: %s", messageMap.toString());
7575
} catch (Throwable t) {
7676
Log.exception(t);
7777
}

AndroidSDKMiPush/src/main/java/com/leanplum/LeanplumMiPushHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void onReceivePassThroughMessage(Context context, MiPushMessage message)
6060
if (context == null || message == null)
6161
return;
6262

63-
Log.d("Received MiPush data message %s: %s", message.getMessageId(), getContentLog(message));
63+
Log.i("Received MiPush data message %s: %s", message.getMessageId(), getContentLog(message));
6464
}
6565

6666
/**
@@ -71,7 +71,7 @@ public void onNotificationMessageClicked(Context context, MiPushMessage message)
7171
return;
7272
}
7373

74-
Log.d("MiPush notification clicked %s: %s", message.getMessageId(), getContentLog(message));
74+
Log.i("MiPush notification clicked %s: %s", message.getMessageId(), getContentLog(message));
7575

7676
try {
7777
Map<String, String> messageMap = parsePayload(message.getContent());
@@ -95,7 +95,7 @@ public void onNotificationMessageArrived(Context context, MiPushMessage message)
9595
if (message == null)
9696
return;
9797

98-
Log.d("Received MiPush notification message %s: %s",
98+
Log.i("Received MiPush notification message %s: %s",
9999
message.getMessageId(), getContentLog(message));
100100

101101
try {

AndroidSDKPush/src/main/java/com/leanplum/LeanplumCloudMessagingProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void setRegistrationId(String registrationId) {
4949
return;
5050
}
5151

52-
Log.d("Registering for %s push notifications with ID %s", getType(), registrationId);
52+
Log.i("Registering for %s push notifications with ID %s", getType(), registrationId);
5353

5454
if (!registrationId.equals(getRegistrationId())) {
5555
storeRegistrationId(registrationId);

AndroidSDKPush/src/main/java/com/leanplum/LeanplumNotificationHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static Bitmap getBigPictureBitmap(Context context, String imageUrl) {
502502
if (!TextUtils.isEmpty(imageUrl) && Build.VERSION.SDK_INT >= 16) {
503503
bigPicture = BitmapUtil.getScaledBitmap(context, imageUrl);
504504
if (bigPicture == null) {
505-
Log.d("Failed to download image for push notification: %s", imageUrl);
505+
Log.i("Failed to download image for push notification: %s", imageUrl);
506506
}
507507
}
508508
return bigPicture;

AndroidSDKPush/src/main/java/com/leanplum/LeanplumPushService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ public static Map<String, Object> parseNotificationBundle(Bundle notificationBun
497497

498498
return arguments;
499499
} catch (Throwable ignored) {
500-
Log.d("Failed to parse notification bundle.");
500+
Log.i("Failed to parse notification bundle.");
501501
}
502502
return null;
503503
}
@@ -512,12 +512,12 @@ public static Map<String, Object> parseNotificationBundle(Bundle notificationBun
512512
*/
513513
public static Bundle preHandlePushNotification(Context context, Intent intent) {
514514
if (intent == null) {
515-
Log.d("Unable to pre handle push notification, Intent is null.");
515+
Log.i("Unable to pre handle push notification, Intent is null.");
516516
return null;
517517
}
518518
Bundle notification = intent.getExtras();
519519
if (notification == null) {
520-
Log.d("Unable to pre handle push notification, extras are null.");
520+
Log.i("Unable to pre handle push notification, extras are null.");
521521
return null;
522522
}
523523
return notification;

AndroidSDKPush/src/main/java/com/leanplum/internal/LeanplumLocalPushHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static boolean scheduleLocalPush(ActionContext actionContext, String messageId,
138138
editor.putLong(String.format(Constants.Defaults.LOCAL_NOTIFICATION_KEY, messageId), eta);
139139
SharedPreferencesUtil.commitChanges(editor);
140140

141-
Log.d("Scheduling local notification.");
141+
Log.i("Scheduling local notification.");
142142
return true;
143143
} catch (Throwable t) {
144144
Log.exception(t);

AndroidSDKPush/src/main/java/com/leanplum/internal/LeanplumManifestHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static boolean enableServiceAndStart(Context context, PackageManager pack
6868
try {
6969
context.startService(new Intent(context, clazz));
7070
} catch (Throwable t) {
71-
Log.d("Could not start service for class: %s", clazz.getName());
71+
Log.i("Could not start service for class: %s", clazz.getName());
7272
return false;
7373
}
7474
return true;
@@ -92,7 +92,7 @@ public static boolean enableComponent(Context context, PackageManager packageMan
9292
packageManager.setComponentEnabledSetting(new ComponentName(context, clazz),
9393
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
9494
} catch (Throwable t) {
95-
Log.d("Could not enable component: %s", clazz.getName());
95+
Log.i("Could not enable component: %s", clazz.getName());
9696
return false;
9797
}
9898
return true;

0 commit comments

Comments
 (0)