Skip to content

Commit

Permalink
Removes some logs which are killing our sumologic usage
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1g5 committed Dec 5, 2024
1 parent d4d32c8 commit b22e5cd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 22 deletions.
4 changes: 0 additions & 4 deletions app/src/org/commcare/activities/CommCareGraphActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,5 @@ protected void onCreate(Bundle savedInstanceState) {
protected void onDestroy() {
super.onDestroy();
FirebaseAnalyticsUtil.reportGraphViewFullScreenClosed();

String title = getTitle() == null || getTitle().length() == 0 ? "(no title)" : getTitle().toString();
Logger.log(LogTypes.TYPE_GRAPHING,
String.format("End viewing full screen graph for %s", title));
}
}
1 change: 0 additions & 1 deletion app/src/org/commcare/android/javarosa/IntentCallout.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ public Intent generate(EvaluationContext ec) {
}
}
}
Logger.log(LogTypes.TYPE_FORM_ENTRY, "Generated intent for callout: " + i.toString());
return i;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ private void publishStatus() {
if (mAppUpdateState == newState) {
return;
}
Logger.log(LogTypes.TYPE_CC_UPDATE, "Publishing status update to : " + newState.name() + ", from : "
+ (mAppUpdateState != null ? mAppUpdateState.name() : "null"));
mAppUpdateState = newState;
mCallback.run();
}
Expand Down
8 changes: 0 additions & 8 deletions app/src/org/commcare/graph/view/GraphView.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,12 @@ public GraphWebView(Context context) {
protected void onAttachedToWindow() {
super.onAttachedToWindow();
FirebaseAnalyticsUtil.reportGraphViewAttached();

String displayTitle = mTitle == null || "".equals(mTitle) ? "(no title)" : mTitle;
Logger.log(LogTypes.TYPE_GRAPHING,
String.format("Start viewing graph in list for %s", displayTitle));
}

@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
FirebaseAnalyticsUtil.reportGraphViewDetached();

String displayTitle = mTitle == null || "".equals(mTitle) ? "(no title)" : mTitle;
Logger.log(LogTypes.TYPE_GRAPHING,
String.format("End viewing graph in list for %s", displayTitle));
}
}

Expand Down
1 change: 0 additions & 1 deletion app/src/org/commcare/preferences/HiddenPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public static int getIdOfInterruptedSSD() {
}

public static void clearInterruptedSSD() {
Logger.log(LogTypes.TYPE_MAINTENANCE, "Clearing interrupted state");
String currentUserId = CommCareApplication.instance().getCurrentUserId();
CommCareApplication.instance().getCurrentApp().getAppPreferences().edit()
.putInt(ID_OF_INTERRUPTED_SSD + currentUserId, -1).apply();
Expand Down
1 change: 0 additions & 1 deletion app/src/org/commcare/tasks/DataPullTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ private ResultAndError<PullTaskResult> doTaskBackgroundHelper() {

publishProgress(PROGRESS_STARTED);
HiddenPreferences.setPostUpdateSyncNeeded(false);
Logger.log(LogTypes.TYPE_USER, "Starting Sync");
determineIfLoginNeeded();

AndroidTransactionParserFactory factory = getTransactionParserFactory();
Expand Down
1 change: 0 additions & 1 deletion app/src/org/commcare/tasks/LogSubmissionTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ private LogSubmitOutcomes checkSubmissionResult(int numberOfLogsToSubmit,
if (submittedSuccesfully.size() == numberOfLogsToSubmit) {
return LogSubmitOutcomes.SUBMITTED;
} else {
Logger.log(LogTypes.TYPE_MAINTENANCE, numberOfLogsToSubmit - submittedSuccesfully.size() + " logs remain on phone.");
//Some remain unsent
return LogSubmitOutcomes.SERIALIZED;
}
Expand Down
12 changes: 8 additions & 4 deletions app/src/org/commcare/utils/FormUploadUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,14 @@ private static boolean buildMultipartEntity(List<MultipartBody.Part> parts,
}
}
}
Logger.log(LogTypes.TYPE_FORM_SUBMISSION, "Attempted to add "
+ numAttachmentsInInstanceFolder + " attachments to submission entity");
Logger.log(LogTypes.TYPE_FORM_SUBMISSION, "Successfully added "
+ numAttachmentsSuccessfullyAdded + " attachments to submission entity");
if (numAttachmentsInInstanceFolder > 0) {
Logger.log(LogTypes.TYPE_FORM_SUBMISSION, "Attempted to add "
+ numAttachmentsInInstanceFolder + " attachments to submission entity");
}
if (numAttachmentsSuccessfullyAdded > 0) {
Logger.log(LogTypes.TYPE_FORM_SUBMISSION, "Successfully added "
+ numAttachmentsSuccessfullyAdded + " attachments to submission entity");
}
return true;
}

Expand Down

0 comments on commit b22e5cd

Please sign in to comment.